diff --git a/components/fpspreadsheet/examples/db_import_export/db_export_import.lpi b/components/fpspreadsheet/examples/db_import_export/db_export_import.lpi
index 42b4a8748..e8b41dd33 100644
--- a/components/fpspreadsheet/examples/db_import_export/db_export_import.lpi
+++ b/components/fpspreadsheet/examples/db_import_export/db_export_import.lpi
@@ -13,9 +13,6 @@
-
-
-
@@ -57,7 +54,7 @@
-
+
diff --git a/components/fpspreadsheet/examples/other/demo_expression_parser.lpi b/components/fpspreadsheet/examples/other/demo_expression_parser.lpi
index 95621c6d0..448744f6a 100644
--- a/components/fpspreadsheet/examples/other/demo_expression_parser.lpi
+++ b/components/fpspreadsheet/examples/other/demo_expression_parser.lpi
@@ -17,9 +17,6 @@
-
-
-
@@ -56,7 +53,7 @@
-
+
diff --git a/components/fpspreadsheet/examples/other/demo_formula_func.lpi b/components/fpspreadsheet/examples/other/demo_formula_func.lpi
index 6af531c5f..fbe7d3cc3 100644
--- a/components/fpspreadsheet/examples/other/demo_formula_func.lpi
+++ b/components/fpspreadsheet/examples/other/demo_formula_func.lpi
@@ -17,9 +17,6 @@
-
-
-
@@ -41,12 +38,10 @@
-
-
@@ -58,7 +53,7 @@
-
+
diff --git a/components/fpspreadsheet/examples/other/demo_recursive_calc.lpi b/components/fpspreadsheet/examples/other/demo_recursive_calc.lpi
index 7d51ad825..21ec22b5f 100644
--- a/components/fpspreadsheet/examples/other/demo_recursive_calc.lpi
+++ b/components/fpspreadsheet/examples/other/demo_recursive_calc.lpi
@@ -17,9 +17,6 @@
-
-
-
@@ -51,7 +48,7 @@
-
+
diff --git a/components/fpspreadsheet/examples/other/demo_sorting.lpi b/components/fpspreadsheet/examples/other/demo_sorting.lpi
index d81f66b6c..3bae90313 100644
--- a/components/fpspreadsheet/examples/other/demo_sorting.lpi
+++ b/components/fpspreadsheet/examples/other/demo_sorting.lpi
@@ -17,9 +17,6 @@
-
-
-
@@ -36,15 +33,11 @@
-
+
-
-
-
-
@@ -55,7 +48,7 @@
-
+
diff --git a/components/fpspreadsheet/examples/other/demo_virtualmode_read.lpi b/components/fpspreadsheet/examples/other/demo_virtualmode_read.lpi
index 5792ed089..aa1e1cd94 100644
--- a/components/fpspreadsheet/examples/other/demo_virtualmode_read.lpi
+++ b/components/fpspreadsheet/examples/other/demo_virtualmode_read.lpi
@@ -17,9 +17,6 @@
-
-
-
@@ -51,7 +48,7 @@
-
+
diff --git a/components/fpspreadsheet/examples/other/demo_virtualmode_write.lpi b/components/fpspreadsheet/examples/other/demo_virtualmode_write.lpi
index fd30185e0..82888e697 100644
--- a/components/fpspreadsheet/examples/other/demo_virtualmode_write.lpi
+++ b/components/fpspreadsheet/examples/other/demo_virtualmode_write.lpi
@@ -17,9 +17,6 @@
-
-
-
@@ -51,7 +48,7 @@
-
+
diff --git a/components/fpspreadsheet/examples/other/demo_write_colors.lpi b/components/fpspreadsheet/examples/other/demo_write_colors.lpi
index c28b1fa0e..62748184b 100644
--- a/components/fpspreadsheet/examples/other/demo_write_colors.lpi
+++ b/components/fpspreadsheet/examples/other/demo_write_colors.lpi
@@ -17,9 +17,6 @@
-
-
-
@@ -51,7 +48,7 @@
-
+
diff --git a/components/fpspreadsheet/examples/other/demo_write_formatting.lpi b/components/fpspreadsheet/examples/other/demo_write_formatting.lpi
index c1184f261..1f864af20 100644
--- a/components/fpspreadsheet/examples/other/demo_write_formatting.lpi
+++ b/components/fpspreadsheet/examples/other/demo_write_formatting.lpi
@@ -17,9 +17,6 @@
-
-
-
@@ -42,7 +39,6 @@
-
@@ -54,7 +50,7 @@
-
+
diff --git a/components/fpspreadsheet/examples/other/demo_write_formula.lpi b/components/fpspreadsheet/examples/other/demo_write_formula.lpi
index 9ad69bc80..7c10d8e55 100644
--- a/components/fpspreadsheet/examples/other/demo_write_formula.lpi
+++ b/components/fpspreadsheet/examples/other/demo_write_formula.lpi
@@ -16,9 +16,6 @@
-
-
-
@@ -65,7 +62,6 @@
-
@@ -76,7 +72,7 @@
-
+
diff --git a/components/fpspreadsheet/examples/other/demo_write_headerfooter_images.lpi b/components/fpspreadsheet/examples/other/demo_write_headerfooter_images.lpi
index e773d9d4d..579ba2a58 100644
--- a/components/fpspreadsheet/examples/other/demo_write_headerfooter_images.lpi
+++ b/components/fpspreadsheet/examples/other/demo_write_headerfooter_images.lpi
@@ -12,9 +12,6 @@
-
-
-
@@ -49,7 +46,7 @@
-
+
diff --git a/components/fpspreadsheet/examples/other/demo_write_images.lpi b/components/fpspreadsheet/examples/other/demo_write_images.lpi
index 5c42000e5..4a17f99c3 100644
--- a/components/fpspreadsheet/examples/other/demo_write_images.lpi
+++ b/components/fpspreadsheet/examples/other/demo_write_images.lpi
@@ -12,9 +12,6 @@
-
-
-
@@ -49,7 +46,7 @@
-
+
diff --git a/components/fpspreadsheet/examples/read_write/csvdemo/csvread.lpi b/components/fpspreadsheet/examples/read_write/csvdemo/csvread.lpi
index 64de7ee91..1e34f8437 100644
--- a/components/fpspreadsheet/examples/read_write/csvdemo/csvread.lpi
+++ b/components/fpspreadsheet/examples/read_write/csvdemo/csvread.lpi
@@ -12,9 +12,6 @@
-
-
-
@@ -49,7 +46,7 @@
-
+
diff --git a/components/fpspreadsheet/examples/read_write/csvdemo/csvwrite.lpi b/components/fpspreadsheet/examples/read_write/csvdemo/csvwrite.lpi
index a9fc17a53..95283b66e 100644
--- a/components/fpspreadsheet/examples/read_write/csvdemo/csvwrite.lpi
+++ b/components/fpspreadsheet/examples/read_write/csvdemo/csvwrite.lpi
@@ -12,9 +12,6 @@
-
-
-
@@ -53,7 +50,7 @@
-
+
diff --git a/components/fpspreadsheet/examples/read_write/csvdemo/csvwrite.lpr b/components/fpspreadsheet/examples/read_write/csvdemo/csvwrite.lpr
index a2a0a5fbd..ed1cecc65 100644
--- a/components/fpspreadsheet/examples/read_write/csvdemo/csvwrite.lpr
+++ b/components/fpspreadsheet/examples/read_write/csvdemo/csvwrite.lpr
@@ -50,7 +50,7 @@ begin
// Write some string cells
MyWorksheet.WriteText(1, 0, 'First');
- MyWorksheet.WriteFont (1, 0, 'Arial', 12, [fssBold, fssItalic, fssUnderline], scRed);
+ MyWorksheet.WriteFont(1, 0, 'Arial', 12, [fssBold, fssItalic, fssUnderline], scRed);
MyWorksheet.WriteText(1, 1, 'Second');
MyWorksheet.WriteText(1, 2, 'Third');
MyWorksheet.WriteText(1, 3, 'Fourth');
diff --git a/components/fpspreadsheet/examples/read_write/excel2demo/excel2read.lpi b/components/fpspreadsheet/examples/read_write/excel2demo/excel2read.lpi
index ef7bc8b86..a4a848806 100644
--- a/components/fpspreadsheet/examples/read_write/excel2demo/excel2read.lpi
+++ b/components/fpspreadsheet/examples/read_write/excel2demo/excel2read.lpi
@@ -12,9 +12,6 @@
-
-
-
@@ -49,7 +46,7 @@
-
+
diff --git a/components/fpspreadsheet/examples/read_write/excel2demo/excel2write.lpi b/components/fpspreadsheet/examples/read_write/excel2demo/excel2write.lpi
index 2daaaa4c7..4a1ea196e 100644
--- a/components/fpspreadsheet/examples/read_write/excel2demo/excel2write.lpi
+++ b/components/fpspreadsheet/examples/read_write/excel2demo/excel2write.lpi
@@ -12,9 +12,6 @@
-
-
-
@@ -49,7 +46,7 @@
-
+
diff --git a/components/fpspreadsheet/examples/read_write/excel5demo/excel5read.lpi b/components/fpspreadsheet/examples/read_write/excel5demo/excel5read.lpi
index 3d67c97c6..9ee9e8e84 100644
--- a/components/fpspreadsheet/examples/read_write/excel5demo/excel5read.lpi
+++ b/components/fpspreadsheet/examples/read_write/excel5demo/excel5read.lpi
@@ -12,9 +12,6 @@
-
-
-
@@ -49,7 +46,7 @@
-
+
diff --git a/components/fpspreadsheet/examples/read_write/excel5demo/excel5write.lpi b/components/fpspreadsheet/examples/read_write/excel5demo/excel5write.lpi
index fab06a9ec..d8e371368 100644
--- a/components/fpspreadsheet/examples/read_write/excel5demo/excel5write.lpi
+++ b/components/fpspreadsheet/examples/read_write/excel5demo/excel5write.lpi
@@ -12,9 +12,6 @@
-
-
-
@@ -49,7 +46,7 @@
-
+
diff --git a/components/fpspreadsheet/examples/read_write/excel8demo/excel8read.lpi b/components/fpspreadsheet/examples/read_write/excel8demo/excel8read.lpi
index b601d2fed..2e95e1e51 100644
--- a/components/fpspreadsheet/examples/read_write/excel8demo/excel8read.lpi
+++ b/components/fpspreadsheet/examples/read_write/excel8demo/excel8read.lpi
@@ -11,9 +11,6 @@
-
-
-
@@ -49,7 +46,7 @@
-
+
diff --git a/components/fpspreadsheet/examples/read_write/excel8demo/excel8write.lpi b/components/fpspreadsheet/examples/read_write/excel8demo/excel8write.lpi
index 3548256b0..ad04b5f21 100644
--- a/components/fpspreadsheet/examples/read_write/excel8demo/excel8write.lpi
+++ b/components/fpspreadsheet/examples/read_write/excel8demo/excel8write.lpi
@@ -12,9 +12,6 @@
-
-
-
@@ -53,7 +50,7 @@
-
+
diff --git a/components/fpspreadsheet/examples/read_write/excelxmldemo/excelxmlwrite.lpi b/components/fpspreadsheet/examples/read_write/excelxmldemo/excelxmlwrite.lpi
index 08a67d75e..7debaa11d 100644
--- a/components/fpspreadsheet/examples/read_write/excelxmldemo/excelxmlwrite.lpi
+++ b/components/fpspreadsheet/examples/read_write/excelxmldemo/excelxmlwrite.lpi
@@ -12,9 +12,6 @@
-
-
-
@@ -49,7 +46,7 @@
-
+
diff --git a/components/fpspreadsheet/examples/read_write/htmldemo/htmlread.lpi b/components/fpspreadsheet/examples/read_write/htmldemo/htmlread.lpi
index cf636a9ab..17f31ae22 100644
--- a/components/fpspreadsheet/examples/read_write/htmldemo/htmlread.lpi
+++ b/components/fpspreadsheet/examples/read_write/htmldemo/htmlread.lpi
@@ -12,9 +12,6 @@
-
-
-
@@ -49,7 +46,7 @@
-
+
diff --git a/components/fpspreadsheet/examples/read_write/htmldemo/htmlread_http.lpi b/components/fpspreadsheet/examples/read_write/htmldemo/htmlread_http.lpi
index a24466c24..9760ebca3 100644
--- a/components/fpspreadsheet/examples/read_write/htmldemo/htmlread_http.lpi
+++ b/components/fpspreadsheet/examples/read_write/htmldemo/htmlread_http.lpi
@@ -12,9 +12,6 @@
-
-
-
@@ -49,7 +46,7 @@
-
+
diff --git a/components/fpspreadsheet/examples/read_write/htmldemo/htmlwrite.lpi b/components/fpspreadsheet/examples/read_write/htmldemo/htmlwrite.lpi
index 24037a983..ce992549b 100644
--- a/components/fpspreadsheet/examples/read_write/htmldemo/htmlwrite.lpi
+++ b/components/fpspreadsheet/examples/read_write/htmldemo/htmlwrite.lpi
@@ -12,9 +12,6 @@
-
-
-
@@ -49,7 +46,7 @@
-
+
diff --git a/components/fpspreadsheet/examples/read_write/ooxmldemo/ooxmlread.lpi b/components/fpspreadsheet/examples/read_write/ooxmldemo/ooxmlread.lpi
index aa935037c..6e1e164bb 100644
--- a/components/fpspreadsheet/examples/read_write/ooxmldemo/ooxmlread.lpi
+++ b/components/fpspreadsheet/examples/read_write/ooxmldemo/ooxmlread.lpi
@@ -12,9 +12,6 @@
-
-
-
@@ -49,7 +46,7 @@
-
+
diff --git a/components/fpspreadsheet/examples/read_write/ooxmldemo/ooxmlwrite.lpi b/components/fpspreadsheet/examples/read_write/ooxmldemo/ooxmlwrite.lpi
index f716b9b04..a6402ca77 100644
--- a/components/fpspreadsheet/examples/read_write/ooxmldemo/ooxmlwrite.lpi
+++ b/components/fpspreadsheet/examples/read_write/ooxmldemo/ooxmlwrite.lpi
@@ -12,9 +12,6 @@
-
-
-
@@ -49,7 +46,7 @@
-
+
diff --git a/components/fpspreadsheet/examples/read_write/opendocdemo/opendocread.lpi b/components/fpspreadsheet/examples/read_write/opendocdemo/opendocread.lpi
index 8e59e75f5..8fd988ca9 100644
--- a/components/fpspreadsheet/examples/read_write/opendocdemo/opendocread.lpi
+++ b/components/fpspreadsheet/examples/read_write/opendocdemo/opendocread.lpi
@@ -12,9 +12,6 @@
-
-
-
@@ -49,7 +46,7 @@
-
+
diff --git a/components/fpspreadsheet/examples/read_write/opendocdemo/opendocwrite.lpi b/components/fpspreadsheet/examples/read_write/opendocdemo/opendocwrite.lpi
index 160804dec..9c60029f0 100644
--- a/components/fpspreadsheet/examples/read_write/opendocdemo/opendocwrite.lpi
+++ b/components/fpspreadsheet/examples/read_write/opendocdemo/opendocwrite.lpi
@@ -12,9 +12,6 @@
-
-
-
@@ -49,7 +46,7 @@
-
+
diff --git a/components/fpspreadsheet/examples/read_write/wikitabledemo/wikitableread.lpi b/components/fpspreadsheet/examples/read_write/wikitabledemo/wikitableread.lpi
index 17e05b373..f1abd3c4a 100644
--- a/components/fpspreadsheet/examples/read_write/wikitabledemo/wikitableread.lpi
+++ b/components/fpspreadsheet/examples/read_write/wikitabledemo/wikitableread.lpi
@@ -11,9 +11,6 @@
-
-
-
@@ -49,7 +46,7 @@
-
+
diff --git a/components/fpspreadsheet/examples/read_write/wikitabledemo/wikitablewrite.lpi b/components/fpspreadsheet/examples/read_write/wikitabledemo/wikitablewrite.lpi
index d9b14373a..c04296453 100644
--- a/components/fpspreadsheet/examples/read_write/wikitabledemo/wikitablewrite.lpi
+++ b/components/fpspreadsheet/examples/read_write/wikitabledemo/wikitablewrite.lpi
@@ -12,9 +12,6 @@
-
-
-
@@ -49,7 +46,7 @@
-
+
diff --git a/components/fpspreadsheet/examples/visual/fpsctrls/demo_ctrls.lpi b/components/fpspreadsheet/examples/visual/fpsctrls/demo_ctrls.lpi
index dab84bc61..c1060955e 100644
--- a/components/fpspreadsheet/examples/visual/fpsctrls/demo_ctrls.lpi
+++ b/components/fpspreadsheet/examples/visual/fpsctrls/demo_ctrls.lpi
@@ -22,7 +22,6 @@
-
@@ -57,7 +56,7 @@
-
+
@@ -69,59 +68,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -132,7 +78,6 @@
-
diff --git a/components/fpspreadsheet/examples/visual/fpsctrls/demo_ctrls.lpr b/components/fpspreadsheet/examples/visual/fpsctrls/demo_ctrls.lpr
index 9edf2492f..033679b39 100644
--- a/components/fpspreadsheet/examples/visual/fpsctrls/demo_ctrls.lpr
+++ b/components/fpspreadsheet/examples/visual/fpsctrls/demo_ctrls.lpr
@@ -7,7 +7,7 @@ uses
cthreads,
{$ENDIF}{$ENDIF}
Interfaces, // this includes the LCL widgetset
- Forms, main, sHyperlinkForm, sNumFormatForm, sSearchForm;
+ Forms, main;
{$R *.res}
diff --git a/components/fpspreadsheet/examples/visual/fpsctrls_no_install/demo_ctrls.lpi b/components/fpspreadsheet/examples/visual/fpsctrls_no_install/demo_ctrls.lpi
index 3f2947184..188c14b11 100644
--- a/components/fpspreadsheet/examples/visual/fpsctrls_no_install/demo_ctrls.lpi
+++ b/components/fpspreadsheet/examples/visual/fpsctrls_no_install/demo_ctrls.lpi
@@ -14,9 +14,6 @@
-
-
-
@@ -55,7 +52,7 @@
-
+
diff --git a/components/fpspreadsheet/examples/visual/fpsgrid/mainform.pas b/components/fpspreadsheet/examples/visual/fpsgrid/mainform.pas
index 4cb44063c..06c6b8b16 100644
--- a/components/fpspreadsheet/examples/visual/fpsgrid/mainform.pas
+++ b/components/fpspreadsheet/examples/visual/fpsgrid/mainform.pas
@@ -48,7 +48,7 @@ implementation
uses
fpcanvas, lazutf8,
- fpstypes, fpsutils, fpsRegFileFormats, fpspreadsheet;
+ fpstypes, fpsutils, fpsReaderWriter, fpspreadsheet;
{ TForm1 }
diff --git a/components/fpspreadsheet/examples/visual/fpsgrid_no_install/fpsgrid.lpi b/components/fpspreadsheet/examples/visual/fpsgrid_no_install/fpsgrid.lpi
index bd4f9b862..4f110d287 100644
--- a/components/fpspreadsheet/examples/visual/fpsgrid_no_install/fpsgrid.lpi
+++ b/components/fpspreadsheet/examples/visual/fpsgrid_no_install/fpsgrid.lpi
@@ -14,9 +14,6 @@
-
-
-
@@ -78,7 +75,7 @@
-
+
diff --git a/components/fpspreadsheet/examples/visual/fpsgrid_no_install/mainfrm.pas b/components/fpspreadsheet/examples/visual/fpsgrid_no_install/mainfrm.pas
index 24587a7a7..87593c700 100644
--- a/components/fpspreadsheet/examples/visual/fpsgrid_no_install/mainfrm.pas
+++ b/components/fpspreadsheet/examples/visual/fpsgrid_no_install/mainfrm.pas
@@ -53,7 +53,7 @@ implementation
{$R *.lfm}
uses
- fpsUtils, fpsRegFileFormats;
+ fpsUtils, fpsReaderWriter;
{ TForm1 }
diff --git a/components/fpspreadsheet/examples/visual/wikitablemaker/wikitablemaker.lpi b/components/fpspreadsheet/examples/visual/wikitablemaker/wikitablemaker.lpi
index 1e84b5213..8397fe6f1 100644
--- a/components/fpspreadsheet/examples/visual/wikitablemaker/wikitablemaker.lpi
+++ b/components/fpspreadsheet/examples/visual/wikitablemaker/wikitablemaker.lpi
@@ -12,7 +12,6 @@
-
@@ -126,7 +125,7 @@
-
+
diff --git a/components/fpspreadsheet/examples/visual/wikitablemaker/wtmain.lfm b/components/fpspreadsheet/examples/visual/wikitablemaker/wtmain.lfm
index b85c963c8..01922a0e3 100644
--- a/components/fpspreadsheet/examples/visual/wikitablemaker/wtmain.lfm
+++ b/components/fpspreadsheet/examples/visual/wikitablemaker/wtmain.lfm
@@ -792,121 +792,13 @@ object MainFrm: TMainFrm
Caption = '&File'
object MnuNew: TMenuItem
Action = AcNew
- Bitmap.Data = {
- 36040000424D3604000000000000360000002800000010000000100000000100
- 2000000000000004000064000000640000000000000000000000FFFFFF000000
- 001D000000340000003600000036000000360000003600000036000000360000
- 0036000000360000003600000036000000330000001DFFFFFF00FFFFFF000000
- 0034F9F9F9F5FCFCFCFDFCFCFCFFFCFCFCFFFCFCFCFFFCFCFCFFFCFCFCFFFCFC
- FCFFFCFCFCFFFCFCFCFFFCFCFCFDF9F9F9F300000033FFFFFF00000000010000
- 0036FCFCFCFEFCFCFCFFFCFCFCFFFCFCFCFFFCFCFCFFFCFCFCFFFCFCFCFFFCFC
- FCFFFCFCFCFFFCFCFCFFFCFCFCFFFCFCFCFD00000036FFFFFF00000000010000
- 0036FCFCFCFFFCFCFCFFFCFCFCFFFCFCFCFFFCFCFCFFFBFBFBFFFBFBFBFFFBFB
- FBFFFBFBFBFFFBFBFBFFFBFBFBFFFCFCFCFF0000003600000001000000010000
- 0036FCFCFCFFFCFCFCFFFCFCFCFFFCFCFCFFFBFBFBFFFBFBFBFFFAFAFAFFFAFA
- FAFFFAFAFAFFFAFAFAFFFAFAFAFFFCFCFCFF0000003600000001000000010000
- 0036FCFCFCFFFCFCFCFFFCFCFCFFFCFCFCFFFBFBFBFFFBFBFBFFFBFBFBFFFAFA
- FAFFFAFAFAFFF8F8F8FFF8F8F8FFFCFCFCFF0000003600000001000000010000
- 0036FCFCFCFFFCFCFCFFFCFCFCFFFCFCFCFFFCFCFCFFFCFCFCFFFCFCFCFFFBFB
- FBFFF9F9F9FFF9F9F9FFF8F8F8FFFCFCFCFF0000003600000001000000010000
- 0036FCFCFCFFFCFCFCFFFCFCFCFFFCFCFCFFFCFCFCFFFCFCFCFFFCFCFCFFFAFA
- FAFFF9F9F9FFF6F6F6FFF6F6F6FFFCFCFCFF0000003600000001000000010000
- 0036FCFCFCFFFCFCFCFFFCFCFCFFFCFCFCFFFCFCFCFFFCFCFCFFFBFBFBFFF8F8
- F8FFF6F6F6FFF3F3F3FFF2F2F2FFFCFCFCFF0000003600000001000000010000
- 0036FCFCFCFFFCFCFCFFFCFCFCFFFCFCFCFFFCFCFCFFFBFBFBFFF8F8F8FFF5F5
- F5FFF2F2F2FFEFEFEFFFEDEDEDFFFCFCFCFF0000003600000001000000010000
- 0036FCFCFCFFFBFBFBFFFCFCFCFFFCFCFCFFFBFBFBFFF8F8F8FFF5F5F5FFF1F1
- F1FFECECECFFEAEAEAFFE6E6E6FFFCFCFCFF0000003600000001000000010000
- 0036FCFCFCFFF9F9F9FFF9F9F9FFF9F9F9FFF7F7F7FFF6F6F6FFF2F2F2FFEBEB
- EBFFFCFCFCFFFCFCFCFFFCFCFCFFFCFCFCFF0000003600000001000000010000
- 0036FCFCFCFFF7F7F7FFF9F9F9FFF7F7F7FFF7F7F7FFF3F3F3FFF0F0F0FFEAEA
- EAFFFCFCFCFFF6F6F6FFF4F4F4FF9999999100000020FFFFFF00FFFFFF000000
- 0036FBFBFBFDF4F4F4FFF5F5F5FFF5F5F5FFF5F5F5FFF1F1F1FFEFEFEFFFE9E9
- E9FFFCFCFCFFE7E7E7FF959595910000002000000002FFFFFF00FFFFFF000000
- 0033F8F8F8F0FBFBFBFDFCFCFCFFFCFCFCFFFCFCFCFFFCFCFCFFFCFCFCFFFCFC
- FCFFF8F8F8FF949494910000002000000002FFFFFF00FFFFFF00FFFFFF000000
- 001C000000330000003600000036000000360000003600000036000000360000
- 0036000000360000002000000002FFFFFF00FFFFFF00FFFFFF00
- }
end
object mnuOpen: TMenuItem
Action = AcOpen
- Bitmap.Data = {
- 36040000424D3604000000000000360000002800000010000000100000000100
- 20000000000000040000640000006400000000000000000000002C86D8002D88
- D8F72D87D8F72D88D8F72D88D8F72D88D8F72D88D8F72D88D8F72D88D8F72D88
- D8F72D88D8F72D87D8F72D88D8F72C86D800FFFFFF00FFFFFF00338ED9FBDCF0
- FAFF98E1F6FF95E0F6FF92DFF6FF8EDEF5FF89DCF5FF85DAF4FF80D9F4FF7AD7
- F3FF74D5F3FF70D3F2FFC2EAF8FF3594DAFFFFFFFF00FFFFFF003594DAF7EFFA
- FEFF93E5F8FF8FE4F8FF89E3F8FF82E1F7FF7ADFF7FF71DEF6FF67DBF5FF5BD8
- F4FF4DD4F3FF40D1F2FFCAF2FBFF3594DAFFFFFFFF00FFFFFF00369ADAF8F2FA
- FDFF94E6F8FF92E5F8FF90E5F8FF8BE3F8FF86E2F7FF7FE1F7FF77DEF6FF6CDC
- F6FF5ED9F4FF4FD5F3FFCCF2FBFF3594DAFFFFFFFF00FFFFFF0036A1DAF9F6FC
- FEFF94E5F8FF93E5F8FF93E5F8FF91E5F8FF93DBE9FF93D7E3FF93D2DCFF90CE
- D7FF8CC8CFFF86C1C6FFC9D8D6FF3594DAFFC57444E8CA7F53F137A6DAFAFEFF
- FFFFF8FDFFFFF6FDFFFFF5FCFFFFF3FCFEFF9AE4F4FF9AE6F7FF9BE6F6FF9DE5
- F5FF9EE5F5FF9FE5F4FFDAF3F8FF3594DAFFFDF4EEFFCA8054F935ABDAFAE8F6
- FBFF70BCE7FF55AAE2FF4DA5E0FF91C9EBFFFAF3EFFFFDFEFDFFFFFDFCFFFFFD
- FCFFFEFDFCFFFEFCFBFFFEFEFDFF3594DAFFEFF2E8FFCE8156FF36AADAF2F1FA
- FDFF94DEF5FF93DCF4FF64BCE9FF3594DAFF3594DAFF3594DAFF3594DAFF3594
- DAFF3594DAFF3594DAFF3594DAFF3594DAFFFBF6EFFFCC8355FE35AFDAF0F7FC
- FEFF8EE4F8FF91DEF5FF9FE0F5FFACE1F6FFCA8452FFFFF7F1FFFFE9D9FFFFEA
- DBFFFFE9D9FFFFE7D7FFFFE5D2FFFFE2CBFFFFF7F1FFCB8555FE36B3DAF8FDFE
- FEFFFEFFFFFFFEFEFFFFFDFEFFFFFEFFFFFFE4BA91FFFFF7F0FFFFE7D5FFFDE7
- D6FFFDE6D4FFFCE4D0FFFBE3CBFFFADCC2FFFEF3E8FFCC8656FE34B4D9D05EC2
- E1FA60C3E2FA60C3E2FA60C3E2FA5FC3E2FAE4BB91FFFFF7F2FFFEE7D5FFFEE7
- D5FFFDE5D1FFFAE0CAFFF9DEC4FFF7D9BCFFFDF2E7FFCC8757FEFFFFFF00FFFF
- FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00E4BB92FFFEF7F1FFFCE5D2FFFCE4
- D1FFFBE2CCFFF9DDC4FFF6D7BBFFF3D1AFFFFAEFE4FFCC8758FEFFFFFF00FFFF
- FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00E4BB92FFFEF6F0FFFCE2CDFFFCE3
- CDFFFADFC8FFF7D9BCFFF5E9DDFFFAF3EBFFFBF8F3FFCA8353FEFFFFFF00FFFF
- FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00E4BB93FFFEF5EDFFFCDEC5FFFBE0
- C7FFF9DCC2FFF5D3B4FFFEF9F3FFFAE2C4FFECC193FFC37D4893FFFFFF00FFFF
- FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00E5BE96FFFFFFFEFFFDF3E9FFFDF3
- EAFFFCF2E8FFFAEFE3FFFAF2E7FFEABB88FFCF8555B3B4693D0CFFFFFF00FFFF
- FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00EAC39DFFE6BF96FFE4BB92FFE4BB
- 92FFD1A06CF5D09E6DF6CC965FDAC479427EB2673C09FFFFFF00
- }
OnClick = acOpenExecute
end
object mnuSaveAs: TMenuItem
Action = AcSaveAs
- Bitmap.Data = {
- 36040000424D3604000000000000360000002800000010000000100000000100
- 2000000000000004000064000000640000000000000000000000BA6A3600B969
- 35B5B86935EEB76835FFB56835FFB46734FFB26634FFB06533FFAE6433FFAC63
- 32FFAA6232FFA96132FFA86031FFA76031FEA66031F1A86131C4BA6A35DEEBC6
- ADFFEAC5ADFFFEFBF8FFFEFBF8FFFEFBF8FFFEFBF8FFFEFBF8FFFEFBF8FFFEFB
- F8FFFEFBF8FFFEFBF8FFFEFBF8FFC89A7CFFC79879FFA76031EDBA6B37FEEDCA
- B3FFE0A27AFFFEFAF7FF62C088FF62C088FF62C088FF62C088FF62C088FF62C0
- 88FF62C088FF62C088FFFDF9F6FFCA8D65FFC99B7CFFA76031FEBB6C38FFEECC
- B6FFE1A27AFFFEFAF7FFBFDCC2FFBFDCC2FFBFDCC2FFBFDCC2FFBFDCC2FFBFDC
- C2FFBFDCC2FFBFDCC2FFFDF9F6FFCD9068FFCC9E81FFA86132FFBB6B38FFEFCE
- B8FFE1A279FFFEFAF7FF62C088FF62C088FF62C088FF62C088FF62C088FF62C0
- 88FF62C088FF62C088FFFDF9F6FFCF936AFFCEA384FFAA6132FFBA6A36FFEFD0
- BBFFE2A27AFFFEFBF8FFFEFBF8FFFEFBF8FFFEFBF8FFFEFBF8FFFEFBF8FFFEFB
- F8FFFEFBF8FFFEFBF8FFFEFBF8FFD3966DFFD2A78AFFAB6232FFBB6A36FFF0D2
- BEFFE2A37AFFE2A37AFFE1A37AFFE2A37BFFE1A37BFFE0A178FFDE9F77FFDD9F
- 76FFDC9D74FFD99B72FFD89971FFD69970FFD5AB8EFFAD6333FFBB6A36FFF2D5
- C2FFE3A37AFFE3A37AFFE2A37BFFE2A37BFFE2A47BFFE1A279FFE0A178FFDEA0
- 77FFDE9E75FFDC9D74FFDA9B73FFD99B73FFDAB095FFAF6433FFBB6A36FFF2D8
- C5FFE3A47BFFE3A37AFFE3A47AFFE2A47BFFE2A37BFFE1A37BFFE1A279FFDFA0
- 77FFDE9F76FFDD9E74FFDB9C72FFDC9D74FFDDB59AFFB16534FFBB6B36FFF4D9
- C7FFE6A67DFFC88C64FFC98D65FFC98E67FFCB926CFFCB926DFFCA9069FFC88C
- 65FFC88C64FFC88C64FFC88C64FFDA9C74FFE1BA9FFFB36634FFBB6B36FEF4DC
- C9FFE7A77DFFF9ECE1FFF9ECE1FFF9EDE3FFFCF4EEFFFDFAF7FFFDF7F3FFFAED
- E5FFF7E7DBFFF7E5D9FFF6E5D8FFDEA077FFE4BEA4FFB46734FFBC6B36FAF5DD
- CCFFE7A87EFFFAF0E8FFFAF0E8FFC98D66FFFAF0E9FFFDF8F3FFFEFAF8FFFCF4
- EFFFF9E9DFFFF7E7DBFFF7E5D9FFE0A278FFE7C2A9FFB66835FFBC6B36F0F6DF
- D0FFE8A87EFFFCF6F1FFFCF6F1FFC88C64FFFAF1E9FFFBF4EEFFFDFAF7FFFDF9
- F6FFFAF0E8FFF8E8DDFFF7E6DBFFE1A37AFFEFD5C3FFB76935FEBC6B36D8F6DF
- D1FFE9AA80FFFEFAF6FFFDFAF6FFC88C64FFFBF3EEFFFBF1EAFFFCF6F2FFFEFB
- F8FFFCF6F1FFF9ECE2FFF8E7DBFFEED0BAFFECD0BDFFBB703EF8BC6B369BF6E0
- D1FFF7E0D1FFFEFBF8FFFEFBF7FFFDF9F6FFFCF5F0FFFAF0EAFFFBF2EDFFFDF9
- F6FFFDFAF7FFFBF1EBFFF8E9DFFEECD0BDFBC9895EECB5693563BC6B3671BC6B
- 3690BC6B36CCBC6B36EEBC6B36FABB6B36FEBB6B36FFBB6A36FFBB6A36FFBC6C
- 39FFBD6E3BFFBB6D3AFFBB6B38EFBB703ECBB6693554FFFFFF00
- }
OnClick = acSaveAsExecute
end
object MnuFileSeparator1: TMenuItem
@@ -914,42 +806,6 @@ object MainFrm: TMainFrm
end
object mnuQuit: TMenuItem
Action = AcQuit
- Bitmap.Data = {
- 36040000424D3604000000000000360000002800000010000000100000000100
- 2000000000000004000064000000640000000000000000000000FFFFFF00FFFF
- FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF001D63
- 9B1619609839145D9562105A92880D5890A4135C92FC0C578FED999999FF7171
- 71FF545454FF515151FF4F4F4FFF4C4C4CFF4A4A4AFF474747FF454545FF2567
- 9DFF3274A8FF3D7CAFFF4784B5FF4E8ABAFF3E7EADFF0C578FEAFFFFFF00FFFF
- FF00585858FFA2A2A2FFA2A2A2FFA3A3A3FFA4A4A4FFA4A4A4FFA5A5A5FF2F6F
- A5FF78ABD2FF78ABD3FF73A7D1FF69A0CDFF407FAEFF0F5991EAFFFFFF00FFFF
- FF005C5C5CFFA1A1A1FF3C7340FFA0A1A1FFA3A3A3FFA3A3A3FFA4A4A4FF3674
- AAFF7DAFD4FF5B9AC9FF5495C7FF5896C8FF4180AEFF135C94EAFFFFFF00FFFF
- FF00606060FFA0A0A0FF3D7641FF367139FFA2A2A2FFA2A2A2FFA3A3A3FF3D79
- B0FF82B3D7FF629FCCFF5A9AC9FF5E9BCAFF4381AFFF196098EA37823EFF347E
- 3BFF317937FF2E7534FF499150FF468F4CFF39733DFFA1A1A1FFA2A2A2FF457E
- B4FF88B7D9FF67A3CFFF619ECCFF639FCCFF4583B1FF1F649CEA3B8742FF89CB
- 92FF84C88DFF80C688FF7BC383FF77C17FFF478F4DFF3B743FFFA1A1A1FF4C84
- BAFF8DBBDBFF6EA8D1FF66A6D1FF5FB4DFFF4785B1FF2569A1EA3E8B46FF8FCE
- 99FF7DC687FF78C381FF73C07CFF74C07CFF79C281FF49904FFF547F57FF5489
- BFFF94BFDDFF75ADD4FF63B8E1FF4BD4FFFF428BB8FF2C6EA6EA41904AFF94D2
- 9FFF91D09AFF8DCD96FF89CB92FF84C88DFF519858FF417C46FF9F9F9FFF5A8E
- C4FF98C3E0FF7CB3D7FF74AFD6FF5EC4EDFF4B88B3FF3473ABEA44944DFF4291
- 4BFF3F8D48FF3D8945FF5DA465FF5AA061FF45834BFF9E9E9EFF9E9E9EFF6092
- C9FF9EC7E2FF83B8DAFF7DB4D7FF7EB3D7FF4F89B4FF3B79B1EAFFFFFF00FFFF
- FF00777777FF9A9A9AFF3D8A45FF498A4FFF9C9C9CFF9D9D9DFF9D9D9DFF6696
- CCFFA2CBE3FF89BDDCFF83B9DAFF84B9DAFF518BB5FF437EB6EAFFFFFF00FFFF
- FF007A7A7AFF999999FF529159FF999A99FF9B9B9BFF9C9C9CFF9C9C9CFF6C9A
- D0FFA7CEE5FF8FC1DFFF89BDDCFF8BBDDCFF538DB6FF4B84BCEAFFFFFF00FFFF
- FF007D7D7DFF999999FF999999FF9A9A9AFF9A9A9AFF9B9B9BFF9B9B9BFF6F9D
- D3FFAAD1E7FFABD1E7FF98C7E1FF91C2DEFF568FB7FF5289C1EAFFFFFF00FFFF
- FF00808080FF7E7E7EFF7C7C7CFF7A7A7AFF777777FF757575FF727272FF719E
- D4FF6F9ED6FF87B2DCFFABD3E8FFA9D0E6FF5890B8FF598EC6EAFFFFFF00FFFF
- FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
- FF00FFFFFF00709ED6DB6D9CD4FF85B1DAFF5A91B9FF6093CBEAFFFFFF00FFFF
- FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
- FF00FFFFFF00FFFFFF00FFFFFF006D9CD4896A9AD2FB6697CFEE
- }
OnClick = acQuitExecute
end
end
@@ -968,162 +824,18 @@ object MainFrm: TMainFrm
end
object MnuAddCol: TMenuItem
Action = AcAddColumn
- Bitmap.Data = {
- 36040000424D3604000000000000360000002800000010000000100000000100
- 2000000000000004000064000000640000000000000000000000FFFFFF00FFFF
- FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
- FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00D69E
- 72C4D3996EF4D19668FFCE9263FFCB8E5EFFC98A5BFFC78756FFC38452FFC384
- 52FFC38452FFC38452FFC38452FFC38452FFBB7742B0FFFFFF00FFFFFF00D7A1
- 75FFF8F2EDFFF7F0EAFFF6EDE6FFF4EAE2FFF3E7DEFFF1E4DBFFF0E2D8FFF0E2
- D8FFF0E2D8FFF0E2D8FFF0E2D8FFF0E2D8FFC58A5DFDFFFFFF00FFFFFF00D9A4
- 7AFFF9F3EEFF1D5F21FF226526FF276D2CFFFFFFFFFFFFFFFFFFFFFFFFFFEAC7
- ADFFFFFFFFFFFFFFFFFFFFFFFFFFF0E2D8FFC68C5FFFFFFFFF00FFFFFF00DDA8
- 7EFFF9F3EFFF276D2CFF84C68AFF347E3AFFEBD0BBFFEBD0BBFFEBD1BDFFEACD
- B5FFEACDB5FFEACDB5FFEACDB5FFF0E2D8FFC68A5CFFFFFFFF00FFFFFF00DFAA
- 82FFF9F3EFFF2E7533FF92CC97FF3B8842FFFFFFFFFFFFFFFFFFFFFFFFFFEACF
- BAFFFBF6F2FFFFFFFFFFFFFFFFFFF0E2D8FFC88D5FFFFFFFFF00FFFFFF00E1AE
- 87FFFAF4F0FF347E3AFFA0D3A4FF42924AFFEACCB3FFEACCB3FFEACEB7FFE8C7
- ACFFE8C7ACFFE8C8B0FFE8C8AEFFF0E2D8FFC48654FFFFFFFF00FFFFFF00E3B1
- 8CFFFAF6F1FF3B8842FFACD8B0FF489B51FFFFFFFFFFFFFFFFFFFFFFFFFFE8C7
- ACFFFFFFFFFFFFFFFFFFFFFFFFFFF1E5DBFFC68655FFFFFFFF00FFFFFF00E5B4
- 8FFFFAF6F2FF42924AFFB6DDBAFF4FA358FFE9C7ADFFE9C9AEFFE9C9B0FFE8C7
- ACFFE9C9B0FFE8C8B0FFE8CCB5FFF2E7DEFFC88A59FFFFFFFF00FFFFFF00E7B7
- 94FFFBF7F4FF489B51FFB9DFBDFF54AB5EFFFFFFFFFFFFFFFFFFFFFFFFFFE8C7
- ACFF84B094FF257341FF196B37FF247240FF6C7C4AFFFFFFFF00FFFFFF00E9BA
- 98FFFBF7F4FF4FA358FF4FA358FF59B163FFE9C3A6FFE9C3A6FFE9C3A6FFA2AE
- 8EFF288C53FF64BA8DFF95D2B2FF64BA8DFF288C53FF196B378CFFFFFF00EBBD
- 9BFFFBF7F4FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF2270
- 3EFF62BA8BFF60BA87FFFFFFFFFF60B987FF67BC8FFF196B37F7FFFFFF00ECBF
- 9EFFFBF7F4FF9CD5A5FF98D3A1FF94D09DFF90CE98FF8BCB93FF87C98EFF317B
- 4CFF9CD4B6FFFFFFFFFFFFFFFFFFFFFFFFFF95D2B2FF196B37FFFFFFFF00EEC1
- A1EBFBF7F4FFFBF7F4FFFBF7F4FFFBF7F4FFFBF7F4FFFBF7F4FFFBF7F4FF4989
- 60FF90D3B1FF92D6B1FFFFFFFFFF65BC8CFF67BC8FFF196B37F7FFFFFF00EFC2
- A37EEFC1A2E3EDC09FFFEBBE9DFFEBBC9AFFE9BA96FFE7B793FFE6B590FF9DAF
- 91FF61AB81FF95D4B4FFBAE6D0FF6ABB8FFF2D8F57FF196B378CFFFFFF00FFFF
- FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
- FF00A2AE8EFF5F9771FF4F8E66FF49895FFFA2AE8EFFFFFFFF00
- }
end
object MnuDeleteCol: TMenuItem
Action = AcDeleteColumn
- Bitmap.Data = {
- 36040000424D3604000000000000360000002800000010000000100000000100
- 2000000000000004000064000000640000000000000000000000FFFFFF00FFFF
- FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
- FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00D69E
- 72C4D3996EF4D19668FFCE9263FFCB8E5EFFC98A5BFFC78756FFC38452FFC384
- 52FFC38452FFC38452FFC38452FFC38452FFBB7742B0FFFFFF00FFFFFF00D7A1
- 75FFF8F2EDFFF7F0EAFFF6EDE6FFF4EAE2FFF3E7DEFFF1E4DBFFF0E2D8FFF0E2
- D8FFF0E2D8FFF0E2D8FFF0E2D8FFF0E2D8FFC58A5DFDFFFFFF00FFFFFF00D9A4
- 7AFFF9F3EEFF1C11EAFF1C11EAFF231AECFFFFFFFFFFFFFFFFFFFFFFFFFFEAC7
- ADFFFFFFFFFFFFFFFFFFFFFFFFFFF0E2D8FFC68C5FFFFFFFFF00FFFFFF00DDA8
- 7EFFF9F3EFFF1C11EAFF9399F9FF2E26EEFFEBD0BBFFEBD0BBFFEBD1BDFFEACD
- B5FFEACDB5FFEACDB5FFEACDB5FFF0E2D8FFC68A5CFFFFFFFF00FFFFFF00DFAA
- 82FFF9F3EFFF231AECFF9CA2FAFF3A35F1FFFFFFFFFFFFFFFFFFFFFFFFFFEACF
- BAFFFBF6F2FFFFFFFFFFFFFFFFFFF0E2D8FFC88D5FFFFFFFFF00FFFFFF00E1AE
- 87FFFAF4F0FF2E26EEFFA6ADFBFF4845F4FFEACCB3FFEACCB3FFEACEB7FFE8C7
- ACFFE8C7ACFFE8C8B0FFE8C8AEFFF0E2D8FFC48654FFFFFFFF00FFFFFF00E3B1
- 8CFFFAF6F1FF3A35F1FFB1B9FBFF5654F7FFFFFFFFFFFFFFFFFFFFFFFFFFE8C7
- ACFFFFFFFFFFFFFFFFFFFFFFFFFFF1E5DBFFC68655FFFFFFFF00FFFFFF00E5B4
- 8FFFFAF6F2FF5654F7FFC1CBFCFF6D6FFCFFE9C7ADFFE9C9AEFFE9C9B0FFE8C7
- ACFFE9C9B0FFE8C8B0FFE8CCB5FFF2E7DEFFC88A59FFFFFFFF00FFFFFF00E7B7
- 94FFFBF7F4FF6263FAFFC4CEFDFF7478FEFFFFFFFFFFFFFFFFFFFFFFFFFFE8C7
- ACFF95B0E3FF235CC2FF0543BCFF1E58BEFF6B6C8AFFFFFFFF00FFFFFF00E9BA
- 98FFFBF7F4FF6D6FFCFF7478FEFF7478FEFFE9C3A6FFE9C3A6FFE9C3A6FF818D
- B5FF2865C8FF2177E6FF0579EAFF0164DDFF064EBCFF0345B87AFFFFFF00EBBD
- 9BFFFBF7F4FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF164B
- AEFF639DF4FF187FFFFF0076F8FF0076EEFF0368E1FF0345B9E4FFFFFF00ECBF
- 9EFFFBF7F4FF9CD5A5FF98D3A1FF94D09DFF90CE98FF8BCB93FF87C98EFF0543
- BCFFAECDFEFFFFFFFFFFFFFFFFFFFFFFFFFF187FEFFF0442BCFEFFFFFF00EEC1
- A1EBFBF7F4FFFBF7F4FFFBF7F4FFFBF7F4FFFBF7F4FFFBF7F4FFFBF7F4FF255D
- C2FF8DB5F6FF4D92FFFF1177FFFF2186FFFF408AEBFF0344B9DEFFFFFF00EFC2
- A37EEFC1A2E3EDC09FFFEBBE9DFFEBBC9AFFE9BA96FFE7B793FFE6B590FF96B1
- E3FF3D76D2FF8DB5F7FFB8D6FEFF72A8F5FF2E6BCAFF0443BA6DFFFFFF00FFFF
- FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
- FF007591C3FF235BC0FF0543BCFF1D58BFFF7591C2FFFFFFFF00
- }
end
object MnuTableSeparator2: TMenuItem
Caption = '-'
end
object MnuAddRow: TMenuItem
Action = AcAddRow
- Bitmap.Data = {
- 36040000424D3604000000000000360000002800000010000000100000000100
- 2000000000000004000064000000640000000000000000000000FFFFFF00FFFF
- FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
- FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00D69E
- 72C4D3996EF4D19668FFCE9263FFCB8E5EFFC98A5BFFC78756FFC38452FFC384
- 52FFC38452FFC38452FFC38452FFC38452FFBB7742B0FFFFFF00FFFFFF00D7A1
- 75FFF8F2EDFFF7F0EAFFF6EDE6FFF4EAE2FFF3E7DEFFF1E4DBFFF0E2D8FFF0E2
- D8FFF0E2D8FFF0E2D8FFF0E2D8FFF0E2D8FFC58A5DFDFFFFFF00FFFFFF00D9A4
- 7AFFF9F3EEFFEBD2BEFFFFFFFFFFEBD3BFFFFFFFFFFFFFFFFFFFFFFFFFFFEAC7
- ADFFFFFFFFFFFFFFFFFFFFFFFFFFF0E2D8FFC68C5FFFFFFFFF00FFFFFF00DDA8
- 7EFFF9F3EFFF4FA358FF489B51FF42924AFF42924AFF3B8842FF347E3AFF2E75
- 33FF276D2CFF226526FF1D5F21FFF0E2D8FFC68A5CFFFFFFFF00FFFFFF00DFAA
- 82FFF9F3EFFF58B162FFB9DFBDFFB6DDBAFFB6DDBAFFACD8B0FFA0D3A4FF92CC
- 97FF84C68AFF79C17EFF226526FFF0E2D8FFC88D5FFFFFFFFF00FFFFFF00E1AE
- 87FFFAF4F0FF59B163FF54AB5EFF4FA358FF4FA358FF489B51FF42924AFF3B88
- 42FF347E3AFF2E7533FF276D2CFFF0E2D8FFC48654FFFFFFFF00FFFFFF00E3B1
- 8CFFFAF6F1FFEAC9AEFFFFFFFFFFEAC9B0FFFFFFFFFFFFFFFFFFFFFFFFFFE8C7
- ACFFFFFFFFFFFFFFFFFFFFFFFFFFF1E5DBFFC68655FFFFFFFF00FFFFFF00E5B4
- 8FFFFAF6F2FFE9C6AAFFE9C6ACFFEAC7ACFFE9C7ADFFE9C9AEFFE9C9B0FFE8C7
- ACFFE9C9B0FFE8C8B0FFE8CCB5FFF2E7DEFFC88A59FFFFFFFF00FFFFFF00E7B7
- 94FFFBF7F4FFE9C3A6FFFFFFFFFFE8C4A9FFFFFFFFFFFFFFFFFFFFFFFFFFE8C7
- ACFF84B094FF257341FF196B37FF247240FF6C7C4AFFFFFFFF00FFFFFF00E9BA
- 98FFFBF7F4FFE9C3A6FFE9C3A6FFE9C3A6FFE9C3A6FFE9C3A6FFE9C3A6FFA2AE
- 8EFF288C53FF64BA8DFF95D2B2FF64BA8DFF288C53FF196B378CFFFFFF00EBBD
- 9BFFFBF7F4FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF2270
- 3EFF62BA8BFF60BA87FFFFFFFFFF60B987FF67BC8FFF196B37F7FFFFFF00ECBF
- 9EFFFBF7F4FF9CD5A5FF98D3A1FF94D09DFF90CE98FF8BCB93FF87C98EFF317B
- 4CFF9CD4B6FFFFFFFFFFFFFFFFFFFFFFFFFF95D2B2FF196B37FFFFFFFF00EEC1
- A1EBFBF7F4FFFBF7F4FFFBF7F4FFFBF7F4FFFBF7F4FFFBF7F4FFFBF7F4FF4989
- 60FF90D3B1FF92D6B1FFFFFFFFFF65BC8CFF67BC8FFF196B37F7FFFFFF00EFC2
- A37EEFC1A2E3EDC09FFFEBBE9DFFEBBC9AFFE9BA96FFE7B793FFE6B590FF9DAF
- 91FF61AB81FF95D4B4FFBAE6D0FF6ABB8FFF2D8F57FF196B378CFFFFFF00FFFF
- FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
- FF00A2AE8EFF5F9771FF4F8E66FF49895FFFA2AE8EFFFFFFFF00
- }
end
object MnuDeleteRow: TMenuItem
Action = AcDeleteRow
- Bitmap.Data = {
- 36040000424D3604000000000000360000002800000010000000100000000100
- 2000000000000004000064000000640000000000000000000000FFFFFF00FFFF
- FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
- FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00D69D
- 72C4D3976DF4D09568FFCE9062FFCB8C5DFFC9885BFFC78655FFC28252FFC282
- 52FFC28252FFC28252FFC28252FFC28252FFBA7642B0FFFFFF00FFFFFF00D79F
- 75FFF8F1ECFFF7EFE9FFF6ECE6FFF4E9E2FFF3E6DDFFF1E3DBFFF0E2D8FFF0E2
- D8FFF0E2D8FFF0E2D8FFF0E2D8FFF0E2D8FFC5885DFDFFFFFF00FFFFFF00D9A2
- 79FFF9F2EDFFEBD0BDFFFFFFFFFFEBD2BFFFFFFFFFFFFFFFFFFFFFFFFFFFEAC5
- ACFFFFFFFFFFFFFFFFFFFFFFFFFFF0E2D8FFC68B5EFFFFFFFF00FFFFFF00DDA6
- 7DFFF9F3EFFF6C6CFCFF6262FAFF6262FAFF5353F7FF4644F4FF3835F1FF2C26
- EEFF211AECFF1B11E9FF1B11E9FFF0E2D8FFC6895CFFFFFFFF00FFFFFF00DFA8
- 81FFF9F3EFFF7476FEFFC3CCFDFFC3CCFDFFC0CAFCFFBAC2FCFFB1B8FBFFA5AA
- FBFF9CA0FAFF9398F9FF1B11E9FFF0E2D8FFC88B5EFFFFFFFF00FFFFFF00E1AE
- 87FFFAF4F0FF7476FEFF7476FEFF7476FEFF6C6CFCFF6262FAFF5353F7FF4644
- F4FF3835F1FF2C26EEFF211AECFFF0E2D8FFC48454FFFFFFFF00FFFFFF00E3AF
- 8BFFFAF5F0FFEAC9AEFFFFFFFFFFEAC8B0FFFFFFFFFFFFFFFFFFFFFFFFFFE8C7
- ACFFFFFFFFFFFFFFFFFFFFFFFFFFF1E4DBFFC58555FFFFFFFF00FFFFFF00E5B2
- 8FFFFAF6F2FFE9C4A9FFE9C4ABFFEAC6ACFFE9C7ADFFE9C8ADFFE9C8AFFFE8C7
- ACFFE9C8AFFFE8C7B0FFE8CBB4FFF2E7DEFFC88858FFFFFFFF00FFFFFF00E7B6
- 93FFFBF6F3FFE9C1A5FFFFFFFFFFE8C2A8FFFFFFFFFFFFFFFFFFFFFFFFFFE8C7
- ACFF95AFE3FF235AC1FF0541BBFF1E56BEFF6B6B89FFFFFFFF00FFFFFF00E9B9
- 97FFFBF6F3FFE9C1A5FFE9C1A5FFE9C1A5FFE9C1A5FFE9C1A5FFE9C1A5FF818C
- B5FF2862C8FF2075E6FF0577E9FF0164DDFF064BBCFF0342B77AFFFFFF00EBBC
- 9BFFFBF6F3FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF1648
- AEFF629CF4FF177BFFFF0073F8FF0073EEFF0366E1FF0342B9E4FFFFFF00ECBE
- 9EFFFBF6F3FF9BD5A3FF97D3A0FF94D09DFF90CE97FF8BCB92FF87C98DFF0541
- BBFFAECCFEFFFFFFFFFFFFFFFFFFFFFFFFFF187BEEFF0441BCFEFFFFFF00EEBF
- A0EBFBF6F3FFFBF6F3FFFBF6F3FFFBF6F3FFFBF6F3FFFBF6F3FFFBF6F3FF255B
- C1FF8CB2F6FF4D91FFFF1174FFFF2184FFFF3F86EBFF0342B9DEFFFFFF00EFC1
- A37EEFC0A1E3EDBF9FFFEBBD9DFFEBBB99FFE9B995FFE7B693FFE6B390FF95B0
- E3FF3D73D1FF8DB3F7FFB8D5FEFF71A5F5FF2E69CAFF0440BA6DFFFFFF00FFFF
- FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
- FF007590C3FF2359BFFF0541BBFF1D55BFFF758FC1FFFFFFFF00
- }
end
object MnuTableSeparator3: TMenuItem
Caption = '-'
@@ -1137,42 +849,6 @@ object MainFrm: TMainFrm
Caption = 'Format'
object MnuFOnt: TMenuItem
Action = AcDefaultFont
- Bitmap.Data = {
- 36040000424D3604000000000000360000002800000010000000100000000100
- 2000000000000004000064000000640000000000000000000000FFFFFF00FFFF
- FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
- FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
- FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
- FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
- FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
- FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00CE68
- 38AEDA8F5DFEDB9060FFD78350EDC4502B8DBD422310BC3F222AC34D2BA2D071
- 42EAD67E51FFD57C4DFFC65531BDB6391D31FFFFFF00FFFFFF00FFFFFF00CA5C
- 2F0ACB5F3044E1A475FFDA8C58ECC6522C3DFFFFFF00FFFFFF00BF452413C348
- 277FDC966BFFDB8F60FFBD3F2154B6381E02FFFFFF00FFFFFF00FFFFFF00FFFF
- FF00CB5D3001D3743F9BE2A97CFFCC663799FFFFFF00FFFFFF00FFFFFF00CC63
- 37B1DFA077FFDA895AFFBB3E2222FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
- FF00FFFFFF00CC633215DB935EEAE2A779FFD8834AD3CF6A3AB2CE6839B5D57A
- 45D8E3A881FFD98656F9BE41231BFFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
- FF00FFFFFF00FFFFFF00CF6A365CDF9D68F6DA8B52D1CB5F314EC7592E2ACD67
- 37A0E1A67AFFD88653F2BF46250DFFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
- FF00FFFFFF00FFFFFF00D06A3503D78042AADF9F6AF7CD663466C95D2F0ACC61
- 3388E1A679FFD57A44D2C24A2706FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
- FF00FFFFFF00FFFFFF00FFFFFF00D1713822DE9B63E2DC965EDFCF693554CF69
- 3580E2A97CFFD16C3AA5FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
- FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00D4793C77E2A670F7DA8847ADD67E
- 43A0E4AE82FFCF6D3A99FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
- FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00D67D3B1CDD9656BAE3A973F2E1A8
- 73F5E1A471F7D3773E98CB5F3008FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
- FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00D7833E53E2A76CDEE9BC91FFE7BA
- 8FFFE7B78BFFE2A471FBD67E42B6CB5C2F0AFFFFFF00FFFFFF00FFFFFF00FFFF
- FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00D8874040D88B4385DA8E4994D989
- 438FD8844090D884419AD3733A8ACC62320DC95B2E01FFFFFF00FFFFFF00FFFF
- FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
- FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
- FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
- FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00
- }
end
object MnuHorAlignment: TMenuItem
Caption = 'Horizontal alignment'
@@ -1186,122 +862,14 @@ object MainFrm: TMainFrm
object MnuLeftAlignment: TMenuItem
Action = AcLeftAlign
AutoCheck = True
- Bitmap.Data = {
- 36040000424D3604000000000000360000002800000010000000100000000100
- 2000000000000004000064000000640000000000000000000000FFFFFF00FFFF
- FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
- FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
- FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
- FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
- FF003C3C3CFF353535FF2F2F2FFF292929FF242424FF1E1E1EFF191919FF1414
- 14FF0F0F0FFFFFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
- FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
- FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
- FF004A4A4AFF444444FF3E3E3EFF383838FF323232FF2C2C2CFF262626FF2020
- 20FF1B1B1BFF161616FF111111FF0C0C0CFFFFFFFF00FFFFFF00FFFFFF00FFFF
- FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
- FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
- FF00585858FF525252FF4C4C4CFF464646FF404040FF3A3A3AFF343434FF2E2E
- 2EFF282828FFFFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
- FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
- FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
- FF00646464FF5F5F5FFF5A5A5AFF545454FF4F4F4FFF494949FF434343FF3D3D
- 3DFF373737FF313131FF2B2B2BFF252525FFFFFFFF00FFFFFF00FFFFFF00FFFF
- FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
- FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
- FF006F6F6FFF6B6B6BFF666666FF616161FF5C5C5CFF575757FF515151FF4B4B
- 4BFF454545FFFFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
- FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
- FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
- FF00767676FF747474FF707070FF6C6C6CFF686868FF636363FF5E5E5EFF5959
- 59FF535353FF4E4E4EFF484848FF424242FFFFFFFF00FFFFFF00FFFFFF00FFFF
- FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
- FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
- FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
- FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
- FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
- FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00
- }
end
object MnuCenterAlignment: TMenuItem
Action = AcHorCenterAlign
AutoCheck = True
- Bitmap.Data = {
- 36040000424D3604000000000000360000002800000010000000100000000100
- 2000000000000004000064000000640000000000000000000000FFFFFF00FFFF
- FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
- FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
- FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
- FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
- FF00FFFFFF003535356B2F2F2FFF292929FF242424FF1E1E1EFF191919FF1414
- 14FF0F0F0FFF0B0B0BFF0707076BFFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
- FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
- FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
- FF004A4A4AFF444444FF3E3E3EFF383838FF323232FF2C2C2CFF262626FF2020
- 20FF1B1B1BFF161616FF111111FF0C0C0CFFFFFFFF00FFFFFF00FFFFFF00FFFF
- FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
- FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
- FF00FFFFFF005252526B4C4C4CFF464646FF404040FF3A3A3AFF343434FF2E2E
- 2EFF282828FF232323FF1D1D1D6BFFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
- FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
- FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
- FF00646464FF5F5F5FFF5A5A5AFF545454FF4F4F4FFF494949FF434343FF3D3D
- 3DFF373737FF313131FF2B2B2BFF252525FFFFFFFF00FFFFFF00FFFFFF00FFFF
- FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
- FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
- FF00FFFFFF006B6B6B6B666666FF616161FF5C5C5CFF575757FF515151FF4B4B
- 4BFF454545FF3F3F3FFF3939396BFFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
- FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
- FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
- FF00767676FF747474FF707070FF6C6C6CFF686868FF636363FF5E5E5EFF5959
- 59FF535353FF4E4E4EFF484848FF424242FFFFFFFF00FFFFFF00FFFFFF00FFFF
- FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
- FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
- FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
- FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
- FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
- FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00
- }
end
object MnuRightAligment: TMenuItem
Action = AcRightAlign
AutoCheck = True
- Bitmap.Data = {
- 36040000424D3604000000000000360000002800000010000000100000000100
- 2000000000000004000064000000640000000000000000000000FFFFFF00FFFF
- FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
- FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
- FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
- FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
- FF00FFFFFF00FFFFFF00FFFFFF00292929FF242424FF1E1E1EFF191919FF1414
- 14FF0F0F0FFF0B0B0BFF070707FF030303FFFFFFFF00FFFFFF00FFFFFF00FFFF
- FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
- FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
- FF004A4A4AFF444444FF3E3E3EFF383838FF323232FF2C2C2CFF262626FF2020
- 20FF1B1B1BFF161616FF111111FF0C0C0CFFFFFFFF00FFFFFF00FFFFFF00FFFF
- FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
- FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
- FF00FFFFFF00FFFFFF00FFFFFF00464646FF404040FF3A3A3AFF343434FF2E2E
- 2EFF282828FF232323FF1D1D1DFF181818FFFFFFFF00FFFFFF00FFFFFF00FFFF
- FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
- FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
- FF00646464FF5F5F5FFF5A5A5AFF545454FF4F4F4FFF494949FF434343FF3D3D
- 3DFF373737FF313131FF2B2B2BFF252525FFFFFFFF00FFFFFF00FFFFFF00FFFF
- FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
- FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
- FF00FFFFFF00FFFFFF00FFFFFF00616161FF5C5C5CFF575757FF515151FF4B4B
- 4BFF454545FF3F3F3FFF393939FF333333FFFFFFFF00FFFFFF00FFFFFF00FFFF
- FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
- FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
- FF00767676FF747474FF707070FF6C6C6CFF686868FF636363FF5E5E5EFF5959
- 59FF535353FF4E4E4EFF484848FF424242FFFFFFFF00FFFFFF00FFFFFF00FFFF
- FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
- FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
- FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
- FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
- FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
- FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00
- }
end
end
object MnuVertAlignment: TMenuItem
@@ -1316,122 +884,14 @@ object MainFrm: TMainFrm
object MnuVertTop: TMenuItem
Action = AcVAlignTop
AutoCheck = True
- Bitmap.Data = {
- 36040000424D3604000000000000360000002800000010000000100000000100
- 2000000000000004000064000000640000000000000000000000FFFFFF00FFFF
- FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
- FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
- FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
- FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
- FF003B3B3B00343434002E2E2E0028282800232323001D1D1D00181818001313
- 13000F0F0F000B0B0B000707070003030300FFFFFF00FFFFFF00FFFFFF00FFFF
- FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
- FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
- FF0049494900434343003D3D3D0037373700313131002B2B2B00252525001F1F
- 1F001A1A1A0015151500111111000C0C0C00FFFFFF00FFFFFF00FFFFFF00FFFF
- FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
- FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
- FF0057575700515151004B4B4B00454545003F3F3F0039393900333333002D2D
- 2D0027272700222222001C1C1C0017171700FFFFFF00FFFFFF00FFFFFF00FFFF
- FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
- FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
- FF00636363005E5E5E0059595900535353004E4E4E0048484800424242003C3C
- 3C0036363600303030002A2A2A0024242400FFFFFF00FFFFFF00FFFFFF00FFFF
- FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
- FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
- FF006E6E6EFF6A6A6AFF656565FF606060FF5B5B5BFF565656FF505050FF4A4A
- 4AFF444444FF3E3E3EFF383838FF323232FFFFFFFF00FFFFFF00FFFFFF00FFFF
- FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
- FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
- FF00757575FF737373FF6F6F6FFF6B6B6BFF676767FF626262FF5D5D5DFF5858
- 58FF525252FF4D4D4DFF474747FF414141FFFFFFFF00FFFFFF00FFFFFF00FFFF
- FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
- FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
- FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
- FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
- FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
- FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00
- }
end
object MnuVertCentered: TMenuItem
Action = AcVAlignCenter
AutoCheck = True
- Bitmap.Data = {
- 36040000424D3604000000000000360000002800000010000000100000000100
- 2000000000000004000064000000640000000000000000000000FFFFFF00FFFF
- FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
- FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
- FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
- FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
- FF003B3B3B00343434002E2E2E0028282800232323001D1D1D00181818001313
- 13000F0F0F000B0B0B000707070003030300FFFFFF00FFFFFF00FFFFFF00FFFF
- FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
- FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
- FF0049494900434343003D3D3D0037373700313131002B2B2B00252525001F1F
- 1F001A1A1A0015151500111111000C0C0C00FFFFFF00FFFFFF00FFFFFF00FFFF
- FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
- FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
- FF00575757FF515151FF4B4B4BFF454545FF3F3F3FFF393939FF333333FF2D2D
- 2DFF272727FF222222FF1C1C1CFF171717FFFFFFFF00FFFFFF00FFFFFF00FFFF
- FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
- FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
- FF00636363FF5E5E5EFF595959FF535353FF4E4E4EFF484848FF424242FF3C3C
- 3CFF363636FF303030FF2A2A2AFF242424FFFFFFFF00FFFFFF00FFFFFF00FFFF
- FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
- FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
- FF006E6E6E006A6A6A0065656500606060005B5B5B0056565600505050004A4A
- 4A00444444003E3E3E003838380032323200FFFFFF00FFFFFF00FFFFFF00FFFF
- FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
- FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
- FF0075757500737373006F6F6F006B6B6B0067676700626262005D5D5D005858
- 5800525252004D4D4D004747470041414100FFFFFF00FFFFFF00FFFFFF00FFFF
- FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
- FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
- FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
- FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
- FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
- FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00
- }
end
object MnuVertBottom: TMenuItem
Action = AcVAlignBottom
AutoCheck = True
- Bitmap.Data = {
- 36040000424D3604000000000000360000002800000010000000100000000100
- 2000000000000004000064000000640000000000000000000000FFFFFF00FFFF
- FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
- FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
- FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
- FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
- FF003B3B3BFF343434FF2E2E2EFF282828FF232323FF1D1D1DFF181818FF1313
- 13FF0F0F0FFF0B0B0BFF070707FF030303FFFFFFFF00FFFFFF00FFFFFF00FFFF
- FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
- FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
- FF00494949FF434343FF3D3D3DFF373737FF313131FF2B2B2BFF252525FF1F1F
- 1FFF1A1A1AFF151515FF111111FF0C0C0CFFFFFFFF00FFFFFF00FFFFFF00FFFF
- FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
- FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
- FF0057575700515151004B4B4B00454545003F3F3F0039393900333333002D2D
- 2D0027272700222222001C1C1C0017171700FFFFFF00FFFFFF00FFFFFF00FFFF
- FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
- FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
- FF00636363005E5E5E0059595900535353004E4E4E0048484800424242003C3C
- 3C0036363600303030002A2A2A0024242400FFFFFF00FFFFFF00FFFFFF00FFFF
- FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
- FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
- FF006E6E6E006A6A6A0065656500606060005B5B5B0056565600505050004A4A
- 4A00444444003E3E3E003838380032323200FFFFFF00FFFFFF00FFFFFF00FFFF
- FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
- FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
- FF0075757500737373006F6F6F006B6B6B0067676700626262005D5D5D005858
- 5800525252004D4D4D004747470041414100FFFFFF00FFFFFF00FFFFFF00FFFF
- FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
- FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
- FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
- FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
- FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
- FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00
- }
end
end
object MnuFormatSeparator: TMenuItem
@@ -1439,42 +899,6 @@ object MainFrm: TMainFrm
end
object MnuMergeCells: TMenuItem
Action = AcMergeCells
- Bitmap.Data = {
- 36040000424D3604000000000000360000002800000010000000100000000100
- 2000000000000004000064000000640000000000000000000000FFFFFF00FFFF
- FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
- FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00D69E
- 72C4D3996EF4D19668FFCE9263FFCB8E5EFFC98A5BFFC78756FFC38452FFC384
- 52FFC38452FFC38452FFC38452FFC38452FFBB7742B0FFFFFF00FFFFFF00D7A1
- 75FFF8F2EDFFF7F0EAFFF6EDE6FFF4EAE2FFF3E7DEFFF1E4DBFFF0E2D8FFF0E2
- D8FFF0E2D8FFF0E2D8FFF0E2D8FFF0E2D8FFC58A5DFDFFFFFF00FFFFFF00D9A4
- 7AFFF9F3EEFFEBD2BEFFFFFFFFFFEBD3BFFFFFFFFFFFFFFFFFFFFFFFFFFFEAC7
- ADFFFFFFFFFFFFFFFFFFFFFFFFFFF0E2D8FFC68C5FFFFFFFFF00FFFFFF00DDA8
- 7EFFF9F3EFFFEBD0BAFFEBD0BBFFC68A5CFFC38452FFC38452FFC38452FFCA92
- 66FFEACDB5FFEACDB5FFEACDB5FFF0E2D8FFC68A5CFFFFFFFF00FFFFFF00DFAA
- 82FFF9F3EFFFEACEB7FFFFFFFFFFC88D5FFFFFFFFFFFFFFFFFFFFFFFFFFFC58B
- 5EFFFBF6F2FFFFFFFFFFFFFFFFFFF0E2D8FFC88D5FFFFFFFFF00FFFFFF00E1AE
- 87FFFAF4F0FFEACBB2FFEACCB3FFC48654FFE9C7ADFFE9C9AEFFE9C9B0FFC68C
- 5FFFE8C7ACFFE8C8B0FFE8C8AEFFF0E2D8FFC48654FFFFFFFF00FFFFFF00E3B1
- 8CFFFAF6F1FFEAC9AEFFFFFFFFFFC68655FFFFFFFFFFFFFFFFFFFFFFFFFFC68A
- 5CFFFFFFFFFFFFFFFFFFFFFFFFFFF1E5DBFFC68655FFFFFFFF00FFFFFF00E5B4
- 8FFFFAF6F2FFE9C6AAFFE9C6ACFFC98A5BFFC98A5BFFC78756FFC38452FFC384
- 52FFE9C9B0FFE8C8B0FFE8CCB5FFF2E7DEFFC88A59FFFFFFFF00FFFFFF00E7B7
- 94FFFBF7F4FFE9C3A6FFFFFFFFFFE8C4A9FFFFFFFFFFFFFFFFFFFFFFFFFFE8C7
- ACFFFFFFFFFFFFFFFFFFFFFFFFFFF7F1EBFFCB8F5FFFFFFFFF00FFFFFF00E9BA
- 98FFFBF7F4FFE9C3A6FFE9C3A6FFE9C3A6FFE9C3A6FFE9C3A6FFE9C3A6FFE9C3
- A6FFE9C3A6FFE9C3A6FFE9C3A6FFFBF7F4FFCE9364FFFFFFFF00FFFFFF00EBBD
- 9BFFFBF7F4FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
- FFFFFFFFFFFFFFFFFFFFFFFFFFFFFBF7F4FFD1976AFFFFFFFF00FFFFFF00ECBF
- 9EFFFBF7F4FF9CD5A5FF98D3A1FF94D09DFF90CE98FF8BCB93FF87C98EFF82C6
- 89FF7EC384FF7AC180FF76BE7CFFFBF7F4FFD49B6FFFFFFFFF00FFFFFF00EEC1
- A1EBFBF7F4FFFBF7F4FFFBF7F4FFFBF7F4FFFBF7F4FFFBF7F4FFFBF7F4FFFBF7
- F4FFFBF7F4FFFBF7F4FFFBF7F4FFFBF7F4FFD7A074F8FFFFFF00FFFFFF00EFC2
- A37EEFC1A2E3EDC09FFFEBBE9DFFEBBC9AFFE9BA96FFE7B793FFE6B590FFE4B2
- 8CFFE2AF88FFE0AC84FFDDA980FFDCA57DFFDAA37ACAFFFFFF00FFFFFF00FFFF
- FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
- FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00
- }
end
end
end
@@ -3112,606 +2536,66 @@ object MainFrm: TMainFrm
top = 264
object MnuNoBorders: TMenuItem
Action = AcBorderNone
- Bitmap.Data = {
- 36040000424D3604000000000000360000002800000010000000100000000100
- 2000000000000004000064000000640000000000000000000000FFFFFF00FFFF
- FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
- FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
- FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
- FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000101
- 017B01010115010101A401010115010101A401010115010101A4010101150101
- 01A401010115010101A4010101150101017BFFFFFF00FFFFFF00FFFFFF000101
- 0114010101000101010001010100010101000101010001010113010101000101
- 010001010100010101000101010001010113FFFFFF00FFFFFF00FFFFFF000101
- 0189010101000101010001010100010101000101010001010189010101000101
- 010001010100010101000101010001010189FFFFFF00FFFFFF00FFFFFF000000
- 0011000000000101010001010100010101000000000000000011000000000101
- 010001010100010101000000000000000011FFFFFF00FFFFFF00FFFFFF000000
- 0080000000000000000000000000000000000000000000000080000000000000
- 000000000000000000000000000000000080FFFFFF00FFFFFF00FFFFFF000000
- 0010000000000000000000000000000000000000000000000010000000000000
- 000000000000000000000000000000000010FFFFFF00FFFFFF00FFFFFF000000
- 00780000000F000000780000000F000000780000000F000000780000000F0000
- 00780000000F000000780000000F00000078FFFFFF00FFFFFF00FFFFFF000000
- 000F00000000000000000000000000000000000000000000000F000000000000
- 00000000000000000000000000000000000FFFFFFF00FFFFFF00FFFFFF000000
- 0071000000000000000000000000000000000000000000000071000000000000
- 000000000000000000000000000000000071FFFFFF00FFFFFF00FFFFFF000000
- 000E00000000000000000000000000000000000000000000000E000000000000
- 00000000000000000000000000000000000EFFFFFF00FFFFFF00FFFFFF000000
- 006B00000000000000000000000000000000000000000000006B000000000000
- 00000000000000000000000000000000006BFFFFFF00FFFFFF00FFFFFF000000
- 000E00000000000000000000000000000000000000000000000D000000000000
- 00000000000000000000000000000000000DFFFFFF00FFFFFF00FFFFFF000000
- 004D0000000D000000670000000D000000670000000D000000670000000D0000
- 00670000000D000000670000000D0000004DFFFFFF00FFFFFF00FFFFFF00FFFF
- FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
- FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00
- }
end
object MnuBordersSeparator1: TMenuItem
Caption = '-'
end
object MnuBorderLeft: TMenuItem
Action = AcBorderLeft
- Bitmap.Data = {
- 36040000424D3604000000000000360000002800000010000000100000000100
- 2000000000000004000064000000640000000000000000000000FFFFFF00FFFF
- FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
- FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
- FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
- FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000
- 00AC01010115010101A401010115010101A401010115010101A4010101150101
- 01A401010115010101A4010101150101017BFFFFFF00FFFFFF00FFFFFF000000
- 00D9010101000101010001010100010101000101010001010113010101000101
- 010001010100010101000101010001010113FFFFFF00FFFFFF00FFFFFF000101
- 01CC010101000101010001010100010101000101010001010189010101000101
- 010001010100010101000101010001010189FFFFFF00FFFFFF00FFFFFF000101
- 01C7010101000101010001010100010101000000000000000011000000000101
- 010001010100010101000000000000000011FFFFFF00FFFFFF00FFFFFF000101
- 01C4010101000101010000000000000000000000000000000080000000000000
- 000000000000000000000000000000000080FFFFFF00FFFFFF00FFFFFF000101
- 01C0010101000000000000000000000000000000000000000010000000000000
- 000000000000000000000000000000000010FFFFFF00FFFFFF00FFFFFF000101
- 01BC0000000F000000780000000F000000780000000F000000780000000F0000
- 00780000000F000000780000000F00000078FFFFFF00FFFFFF00FFFFFF000101
- 01B901010100000000000000000000000000000000000000000F000000000000
- 00000000000000000000000000000000000FFFFFFF00FFFFFF00FFFFFF000101
- 01B6010101000101010000000000000000000000000000000071000000000000
- 000000000000000000000000000000000071FFFFFF00FFFFFF00FFFFFF000101
- 01B301010100010101000101010000000000000000000000000E000000000000
- 00000000000000000000000000000000000EFFFFFF00FFFFFF00FFFFFF000101
- 01B001010100010101000000000000000000000000000000006B000000000000
- 00000000000000000000000000000000006BFFFFFF00FFFFFF00FFFFFF000101
- 01AE01010100000000000000000000000000000000000000000D000000000000
- 00000000000000000000000000000000000DFFFFFF00FFFFFF00FFFFFF000101
- 01810000000D000000670000000D000000670000000D000000670000000D0000
- 00670000000D000000670000000D0000004DFFFFFF00FFFFFF00FFFFFF00FFFF
- FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
- FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00
- }
end
object MnuBorderInner: TMenuItem
Action = AcBorderHCenter
- Bitmap.Data = {
- 36040000424D3604000000000000360000002800000010000000100000000100
- 2000000000000004000064000000640000000000000000000000FFFFFF00FFFF
- FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
- FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
- FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
- FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000101
- 017B01010115010101A401010115010101A401010115000000E6010101150101
- 01A401010115010101A4010101150101017BFFFFFF00FFFFFF00FFFFFF000101
- 01140101010001010100010101000101010001010100000000D9010101000101
- 010001010100010101000101010001010113FFFFFF00FFFFFF00FFFFFF000101
- 01890101010001010100010101000101010001010100010101CC010101000101
- 010001010100010101000101010001010189FFFFFF00FFFFFF00FFFFFF000000
- 00110000000001010100010101000101010001010100010101C7010101000101
- 010001010100010101000000000000000011FFFFFF00FFFFFF00FFFFFF000000
- 00800000000000000000000000000101010001010100010101C4010101000101
- 010000000000000000000000000000000080FFFFFF00FFFFFF00FFFFFF000000
- 00100000000000000000000000000000000001010100010101C0010101000000
- 000000000000000000000000000000000010FFFFFF00FFFFFF00FFFFFF000000
- 00780000000F000000780000000F000000780101010F010101BC0000000F0000
- 00780000000F000000780000000F00000078FFFFFF00FFFFFF00FFFFFF000000
- 000F0000000000000000000000000000000001010100010101B9010101000000
- 00000000000000000000000000000000000FFFFFFF00FFFFFF00FFFFFF000000
- 00710000000000000000000000000101010001010100010101B6010101000101
- 010000000000000000000000000000000071FFFFFF00FFFFFF00FFFFFF000000
- 000E0000000000000000010101000101010001010100010101B3010101000101
- 01000101010000000000000000000000000EFFFFFF00FFFFFF00FFFFFF000000
- 006B0000000000000000000000000101010001010100010101B0010101000101
- 01000000000000000000000000000000006BFFFFFF00FFFFFF00FFFFFF000000
- 000E0000000000000000000000000000000001010100010101AE010101000000
- 00000000000000000000000000000000000DFFFFFF00FFFFFF00FFFFFF000000
- 004D0000000D000000670000000D000000670101010D010101AC0000000D0000
- 00670000000D000000670000000D0000004DFFFFFF00FFFFFF00FFFFFF00FFFF
- FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
- FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00
- }
end
object MnuBorderRight: TMenuItem
Action = AcBorderRight
- Bitmap.Data = {
- 36040000424D3604000000000000360000002800000010000000100000000100
- 2000000000000004000064000000640000000000000000000000FFFFFF00FFFF
- FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
- FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
- FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
- FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000101
- 017B01010115010101A401010115010101A401010115010101A4010101150101
- 01A401010115010101A401010115000000ACFFFFFF00FFFFFF00FFFFFF000101
- 0114010101000101010001010100010101000101010001010113010101000101
- 0100010101000101010001010100000000D9FFFFFF00FFFFFF00FFFFFF000101
- 0189010101000101010001010100010101000101010001010189010101000101
- 0100010101000101010001010100010101CCFFFFFF00FFFFFF00FFFFFF000000
- 0011000000000101010001010100010101000000000000000011000000000101
- 0100010101000101010001010100010101C7FFFFFF00FFFFFF00FFFFFF000000
- 0080000000000000000000000000000000000000000000000080000000000000
- 0000000000000101010001010100010101C4FFFFFF00FFFFFF00FFFFFF000000
- 0010000000000000000000000000000000000000000000000010000000000000
- 0000000000000000000001010100010101C0FFFFFF00FFFFFF00FFFFFF000000
- 00780000000F000000780000000F000000780000000F000000780000000F0000
- 00780000000F000000780101010F010101BCFFFFFF00FFFFFF00FFFFFF000000
- 000F00000000000000000000000000000000000000000000000F000000000000
- 0000000000000000000001010100010101B9FFFFFF00FFFFFF00FFFFFF000000
- 0071000000000000000000000000000000000000000000000071000000000000
- 0000000000000101010001010100010101B6FFFFFF00FFFFFF00FFFFFF000000
- 000E00000000000000000000000000000000000000000000000E000000000000
- 0000010101000101010001010100010101B3FFFFFF00FFFFFF00FFFFFF000000
- 006B00000000000000000000000000000000000000000000006B000000000000
- 0000000000000101010001010100010101B0FFFFFF00FFFFFF00FFFFFF000000
- 000E00000000000000000000000000000000000000000000000D000000000000
- 0000000000000000000001010100010101AEFFFFFF00FFFFFF00FFFFFF000000
- 004D0000000D000000670000000D000000670000000D000000670000000D0000
- 00670000000D000000670101010D01010181FFFFFF00FFFFFF00FFFFFF00FFFF
- FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
- FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00
- }
end
object MnuBordersSeparator2: TMenuItem
Caption = '-'
end
object MnuBorderTop: TMenuItem
Action = AcBorderTop
- Bitmap.Data = {
- 36040000424D3604000000000000360000002800000010000000100000000100
- 2000000000000004000064000000640000000000000000000000FFFFFF00FFFF
- FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
- FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
- FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
- FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000101
- 017B01010115010101A401010115010101A401010115010101A4010101150101
- 01A401010115010101A4010101150101017BFFFFFF00FFFFFF00FFFFFF000101
- 0114010101000101010001010100010101000101010001010113010101000101
- 010001010100010101000101010001010113FFFFFF00FFFFFF00FFFFFF000101
- 0189010101000101010001010100010101000101010001010189010101000101
- 010001010100010101000101010001010189FFFFFF00FFFFFF00FFFFFF000000
- 0011000000000101010001010100010101000000000000000011000000000101
- 010001010100010101000000000000000011FFFFFF00FFFFFF00FFFFFF000000
- 0080000000000000000000000000000000000000000000000080000000000000
- 000000000000000000000000000000000080FFFFFF00FFFFFF00FFFFFF000000
- 0010000000000000000000000000000000000000000000000010000000000000
- 000000000000000000000000000000000010FFFFFF00FFFFFF00FFFFFF000000
- 00780000000F000000780000000F000000780000000F000000780000000F0000
- 00780000000F000000780000000F00000078FFFFFF00FFFFFF00FFFFFF000000
- 000F00000000000000000000000000000000000000000000000F000000000000
- 00000000000000000000000000000000000FFFFFFF00FFFFFF00FFFFFF000000
- 0071000000000000000000000000000000000000000000000071000000000000
- 000000000000000000000000000000000071FFFFFF00FFFFFF00FFFFFF000000
- 000E00000000010101000101010001010100000000000000000E000000000000
- 00000101010001010100000000000000000EFFFFFF00FFFFFF00FFFFFF000000
- 006B00000000010101000101010001010100000000000000006B000000000101
- 01000101010001010100000000000000006BFFFFFF00FFFFFF00FFFFFF000101
- 010E01010100010101000101010001010100010101000101010D010101000101
- 01000101010001010100010101000101010DFFFFFF00FFFFFF00FFFFFF000101
- 0181010101AC010101AC010101AC010101AC010101AC010101AC010101AC0101
- 01AC010101AC010101AC010101AC01010181FFFFFF00FFFFFF00FFFFFF00FFFF
- FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
- FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00
- }
end
object MnuBorderVCenter: TMenuItem
Action = AcBorderVCenter
- Bitmap.Data = {
- 36040000424D3604000000000000360000002800000010000000100000000100
- 2000000000000004000064000000640000000000000000000000FFFFFF00FFFF
- FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
- FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
- FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
- FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000101
- 017B01010115010101A401010115010101A401010115010101A4010101150101
- 01A401010115010101A4010101150101017BFFFFFF00FFFFFF00FFFFFF000101
- 0114010101000101010001010100010101000101010001010113010101000101
- 010001010100010101000101010001010113FFFFFF00FFFFFF00FFFFFF000101
- 0189010101000101010001010100010101000101010001010189010101000101
- 010001010100010101000101010001010189FFFFFF00FFFFFF00FFFFFF000000
- 0011000000000101010001010100010101000000000000000011000000000101
- 010001010100010101000000000000000011FFFFFF00FFFFFF00FFFFFF000000
- 0080000000000101010001010100010101000000000000000080000000000101
- 010001010100010101000000000000000080FFFFFF00FFFFFF00FFFFFF000101
- 0110010101000101010001010100010101000101010001010110010101000101
- 010001010100010101000101010001010110FFFFFF00FFFFFF00FFFFFF000101
- 01BC010101BC010101BC010101BC010101BC010101BC010101BC010101BC0101
- 01BC010101BC010101BC010101BC010101BCFFFFFF00FFFFFF00FFFFFF000101
- 010F01010100010101000101010001010100010101000101010F010101000101
- 01000101010001010100010101000101010FFFFFFF00FFFFFF00FFFFFF000000
- 0071000000000101010001010100010101000000000000000071000000000101
- 010001010100010101000000000000000071FFFFFF00FFFFFF00FFFFFF000000
- 000E00000000010101000101010001010100000000000000000E000000000101
- 01000101010001010100000000000000000EFFFFFF00FFFFFF00FFFFFF000000
- 006B00000000000000000000000000000000000000000000006B000000000000
- 00000000000000000000000000000000006BFFFFFF00FFFFFF00FFFFFF000000
- 000E00000000000000000000000000000000000000000000000D000000000000
- 00000000000000000000000000000000000DFFFFFF00FFFFFF00FFFFFF000000
- 004D0000000D000000670000000D000000670000000D000000670000000D0000
- 00670000000D000000670000000D0000004DFFFFFF00FFFFFF00FFFFFF00FFFF
- FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
- FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00
- }
end
object MnuBorderBottom: TMenuItem
Action = AcBorderBottom
- Bitmap.Data = {
- 36040000424D3604000000000000360000002800000010000000100000000100
- 2000000000000004000064000000640000000000000000000000FFFFFF00FFFF
- FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
- FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
- FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
- FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000
- 00AC000000E6000000E6000000E6000000E6000000E6000000E6000000E60000
- 00E6000000E6000000E6000000E6000000ACFFFFFF00FFFFFF00FFFFFF000101
- 0114000000000000000000000000000000000000000001010113010101000000
- 000000000000000000000000000001010113FFFFFF00FFFFFF00FFFFFF000101
- 0189010101000000000000000000000000000101010001010189010101000000
- 000000000000000000000101010001010189FFFFFF00FFFFFF00FFFFFF000000
- 0011000000000000000000000000000000000000000000000011000000000000
- 000000000000000000000000000000000011FFFFFF00FFFFFF00FFFFFF000000
- 0080000000000000000000000000000000000000000000000080000000000000
- 000000000000000000000000000000000080FFFFFF00FFFFFF00FFFFFF000000
- 0010000000000000000000000000000000000000000000000010000000000000
- 000000000000000000000000000000000010FFFFFF00FFFFFF00FFFFFF000000
- 00780000000F000000780000000F000000780000000F000000780000000F0000
- 00780000000F000000780000000F00000078FFFFFF00FFFFFF00FFFFFF000000
- 000F00000000000000000000000000000000000000000000000F000000000000
- 00000000000000000000000000000000000FFFFFFF00FFFFFF00FFFFFF000000
- 0071000000000000000000000000000000000000000000000071000000000000
- 000000000000000000000000000000000071FFFFFF00FFFFFF00FFFFFF000000
- 000E00000000000000000000000000000000000000000000000E000000000000
- 00000000000000000000000000000000000EFFFFFF00FFFFFF00FFFFFF000000
- 006B00000000000000000000000000000000000000000000006B000000000000
- 00000000000000000000000000000000006BFFFFFF00FFFFFF00FFFFFF000000
- 000E00000000000000000000000000000000000000000000000D000000000000
- 00000000000000000000000000000000000DFFFFFF00FFFFFF00FFFFFF000000
- 004D0000000D000000670000000D000000670000000D000000670000000D0000
- 00670000000D000000670000000D0000004DFFFFFF00FFFFFF00FFFFFF00FFFF
- FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
- FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00
- }
end
object MnuBorderBottomDbl: TMenuItem
Action = AcBorderBottomDbl
- Bitmap.Data = {
- 36040000424D3604000000000000360000002800000010000000100000000100
- 2000000000000004000064000000640000000000000000000000FFFFFF00FFFF
- FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
- FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
- FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
- FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000
- 00AC000000E6000000E6000000E6000000E6000000E6000000E6000000E60000
- 00E6000000E6000000E6000000E6000000ACFFFFFF00FFFFFF00FFFFFF000000
- 0000000000000000000000000000000000000000000000000000000000000000
- 000000000000000000000000000000000000FFFFFF00FFFFFF00FFFFFF000101
- 01CC010101CC010101CC010101CC010101CC010101CC010101CC010101CC0101
- 01CC010101CC010101CC010101CC010101CCFFFFFF00FFFFFF00FFFFFF000101
- 0111010101000101010001010100010101000101010001010111010101000101
- 010001010100010101000101010001010111FFFFFF00FFFFFF00FFFFFF000000
- 0080000000000101010001010100010101000000000000000080000000000101
- 010001010100010101000000000000000080FFFFFF00FFFFFF00FFFFFF000000
- 0010000000000000000000000000000000000000000000000010000000000000
- 000000000000000000000000000000000010FFFFFF00FFFFFF00FFFFFF000000
- 00780000000F000000780000000F000000780000000F000000780000000F0000
- 00780000000F000000780000000F00000078FFFFFF00FFFFFF00FFFFFF000000
- 000F00000000000000000000000000000000000000000000000F000000000000
- 00000000000000000000000000000000000FFFFFFF00FFFFFF00FFFFFF000000
- 0071000000000000000000000000000000000000000000000071000000000000
- 000000000000000000000000000000000071FFFFFF00FFFFFF00FFFFFF000000
- 000E00000000000000000000000000000000000000000000000E000000000000
- 00000000000000000000000000000000000EFFFFFF00FFFFFF00FFFFFF000000
- 006B00000000000000000000000000000000000000000000006B000000000000
- 00000000000000000000000000000000006BFFFFFF00FFFFFF00FFFFFF000000
- 000E00000000000000000000000000000000000000000000000D000000000000
- 00000000000000000000000000000000000DFFFFFF00FFFFFF00FFFFFF000000
- 004D0000000D000000670000000D000000670000000D000000670000000D0000
- 00670000000D000000670000000D0000004DFFFFFF00FFFFFF00FFFFFF00FFFF
- FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
- FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00
- }
end
object MnuBorderBottomThick: TMenuItem
Action = AcBorderBottomMedium
- Bitmap.Data = {
- 36040000424D3604000000000000360000002800000010000000100000000100
- 2000000000000004000064000000640000000000000000000000FFFFFF00FFFF
- FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
- FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
- FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
- FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000
- 00AC000000E6000000E6000000E6000000E6000000E6000000E6000000E60000
- 00E6000000E6000000E6000000E6000000ACFFFFFF00FFFFFF00FFFFFF000000
- 00D9000000D9000000D9000000D9000000D9000000D9000000D9000000D90000
- 00D9000000D9000000D9000000D9000000D9FFFFFF00FFFFFF00FFFFFF000101
- 0189000000000000000000000000000000000000000001010189000000000000
- 000000000000000000000000000001010189FFFFFF00FFFFFF00FFFFFF000000
- 0011000000000000000000000000000000000000000000000011000000000000
- 000000000000000000000000000000000011FFFFFF00FFFFFF00FFFFFF000000
- 0080000000000000000000000000000000000000000000000080000000000000
- 000000000000000000000000000000000080FFFFFF00FFFFFF00FFFFFF000000
- 0010000000000000000000000000000000000000000000000010000000000000
- 000000000000000000000000000000000010FFFFFF00FFFFFF00FFFFFF000000
- 00780000000F000000780000000F000000780000000F000000780000000F0000
- 00780000000F000000780000000F00000078FFFFFF00FFFFFF00FFFFFF000000
- 000F00000000000000000000000000000000000000000000000F000000000000
- 00000000000000000000000000000000000FFFFFFF00FFFFFF00FFFFFF000000
- 0071000000000000000000000000000000000000000000000071000000000000
- 000000000000000000000000000000000071FFFFFF00FFFFFF00FFFFFF000000
- 000E00000000000000000000000000000000000000000000000E000000000000
- 00000000000000000000000000000000000EFFFFFF00FFFFFF00FFFFFF000000
- 006B00000000000000000000000000000000000000000000006B000000000000
- 00000000000000000000000000000000006BFFFFFF00FFFFFF00FFFFFF000000
- 000E00000000000000000000000000000000000000000000000D000000000000
- 00000000000000000000000000000000000DFFFFFF00FFFFFF00FFFFFF000000
- 004D0000000D000000670000000D000000670000000D000000670000000D0000
- 00670000000D000000670000000D0000004DFFFFFF00FFFFFF00FFFFFF00FFFF
- FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
- FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00
- }
end
object MenuItem17: TMenuItem
Caption = '-'
end
object MnuBorderTopBottom: TMenuItem
Action = AcBorderTopBottom
- Bitmap.Data = {
- 36040000424D3604000000000000360000002800000010000000100000000100
- 2000000000000004000064000000640000000000000000000000FFFFFF00FFFF
- FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
- FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
- FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
- FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000
- 00AC000000E6000000E6000000E6000000E6000000E6000000E6000000E60000
- 00E6000000E6000000E6000000E6000000ACFFFFFF00FFFFFF00FFFFFF000101
- 0114000000000000000000000000000000000000000001010113010101000000
- 000000000000000000000000000001010113FFFFFF00FFFFFF00FFFFFF000101
- 0189010101000000000000000000000000000101010001010189010101000000
- 000000000000000000000101010001010189FFFFFF00FFFFFF00FFFFFF000000
- 0011000000000000000000000000000000000000000000000011000000000000
- 000000000000000000000000000000000011FFFFFF00FFFFFF00FFFFFF000000
- 0080000000000000000000000000000000000000000000000080000000000000
- 000000000000000000000000000000000080FFFFFF00FFFFFF00FFFFFF000000
- 0010000000000000000000000000000000000000000000000010000000000000
- 000000000000000000000000000000000010FFFFFF00FFFFFF00FFFFFF000000
- 00780000000F000000780000000F000000780000000F000000780000000F0000
- 00780000000F000000780000000F00000078FFFFFF00FFFFFF00FFFFFF000000
- 000F00000000000000000000000000000000000000000000000F000000000000
- 00000000000000000000000000000000000FFFFFFF00FFFFFF00FFFFFF000000
- 0071000000000000000000000000000000000000000000000071000000000000
- 000000000000000000000000000000000071FFFFFF00FFFFFF00FFFFFF000000
- 000E00000000010101000101010001010100000000000000000E000000000000
- 00000101010001010100000000000000000EFFFFFF00FFFFFF00FFFFFF000000
- 006B00000000010101000101010001010100000000000000006B000000000101
- 01000101010001010100000000000000006BFFFFFF00FFFFFF00FFFFFF000101
- 010E01010100010101000101010001010100010101000101010D010101000101
- 01000101010001010100010101000101010DFFFFFF00FFFFFF00FFFFFF000101
- 0181010101AC010101AC010101AC010101AC010101AC010101AC010101AC0101
- 01AC010101AC010101AC010101AC01010181FFFFFF00FFFFFF00FFFFFF00FFFF
- FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
- FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00
- }
end
object MnuBorderTopBottomThick: TMenuItem
Action = AcBorderTopBottomThick
- Bitmap.Data = {
- 36040000424D3604000000000000360000002800000010000000100000000100
- 2000000000000004000064000000640000000000000000000000FFFFFF00FFFF
- FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
- FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
- FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
- FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000
- 00AC000000E6000000E6000000E6000000E6000000E6000000E6000000E60000
- 00E6000000E6000000E6000000E6000000ACFFFFFF00FFFFFF00FFFFFF000000
- 00D9000000D9000000D9000000D9000000D9000000D9000000D9000000D90000
- 00D9000000D9000000D9000000D9000000D9FFFFFF00FFFFFF00FFFFFF000101
- 0189000000000000000000000000000000000000000001010189000000000000
- 000000000000000000000000000001010189FFFFFF00FFFFFF00FFFFFF000000
- 0011000000000000000000000000000000000000000000000011000000000000
- 000000000000000000000000000000000011FFFFFF00FFFFFF00FFFFFF000000
- 0080000000000000000000000000000000000000000000000080000000000000
- 000000000000000000000000000000000080FFFFFF00FFFFFF00FFFFFF000000
- 0010000000000000000000000000000000000000000000000010000000000000
- 000000000000000000000000000000000010FFFFFF00FFFFFF00FFFFFF000000
- 00780000000F000000780000000F000000780000000F000000780000000F0000
- 00780000000F000000780000000F00000078FFFFFF00FFFFFF00FFFFFF000000
- 000F00000000000000000000000000000000000000000000000F000000000000
- 00000000000000000000000000000000000FFFFFFF00FFFFFF00FFFFFF000000
- 0071000000000000000000000000000000000000000000000071000000000000
- 000000000000000000000000000000000071FFFFFF00FFFFFF00FFFFFF000000
- 000E00000000010101000101010001010100000000000000000E000000000000
- 00000101010001010100000000000000000EFFFFFF00FFFFFF00FFFFFF000000
- 006B00000000010101000101010001010100000000000000006B000000000101
- 01000101010001010100000000000000006BFFFFFF00FFFFFF00FFFFFF000101
- 010E01010100010101000101010001010100010101000101010D010101000101
- 01000101010001010100010101000101010DFFFFFF00FFFFFF00FFFFFF000101
- 0181010101AC010101AC010101AC010101AC010101AC010101AC010101AC0101
- 01AC010101AC010101AC010101AC01010181FFFFFF00FFFFFF00FFFFFF00FFFF
- FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
- FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00
- }
end
object MnuBordersSeparator3: TMenuItem
Caption = '-'
end
object MnuBordersInner: TMenuItem
Action = AcBorderInner
- Bitmap.Data = {
- 36040000424D3604000000000000360000002800000010000000100000000100
- 2000000000000004000064000000640000000000000000000000FFFFFF00FFFF
- FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
- FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
- FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
- FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000101
- 017B01010115010101A401010115010101A401010115000000E6010101150101
- 01A401010115010101A4010101150101017BFFFFFF00FFFFFF00FFFFFF000101
- 01140101010001010100010101000101010001010100000000D9010101000101
- 010001010100010101000101010001010113FFFFFF00FFFFFF00FFFFFF000101
- 01890101010001010100010101000101010001010100010101CC010101000101
- 010001010100010101000101010001010189FFFFFF00FFFFFF00FFFFFF000000
- 00110000000001010100010101000101010001010100010101C7010101000101
- 010001010100010101000000000000000011FFFFFF00FFFFFF00FFFFFF000000
- 00800000000001010100010101000101010001010100010101C4010101000101
- 010001010100010101000000000000000080FFFFFF00FFFFFF00FFFFFF000101
- 01100101010001010100010101000101010001010100010101C0010101000101
- 010001010100010101000101010001010110FFFFFF00FFFFFF00FFFFFF000101
- 01BC010101BC010101BC010101BC010101BC010101BC0101018E010101BC0101
- 01BC010101BC010101BC010101BC010101BCFFFFFF00FFFFFF00FFFFFF000101
- 010F0101010001010100010101000101010001010100010101B9010101000101
- 01000101010001010100010101000101010FFFFFFF00FFFFFF00FFFFFF000000
- 00710000000001010100010101000101010001010100010101B6010101000101
- 010001010100010101000000000000000071FFFFFF00FFFFFF00FFFFFF000000
- 000E0000000001010100010101000101010001010100010101B3010101000101
- 01000101010001010100000000000000000EFFFFFF00FFFFFF00FFFFFF000000
- 006B0000000000000000000000000101010001010100010101B0010101000101
- 01000000000000000000000000000000006BFFFFFF00FFFFFF00FFFFFF000000
- 000E0000000000000000000000000000000001010100010101AE010101000000
- 00000000000000000000000000000000000DFFFFFF00FFFFFF00FFFFFF000000
- 004D0000000D000000670000000D000000670101010D010101AC0000000D0000
- 00670000000D000000670000000D0000004DFFFFFF00FFFFFF00FFFFFF00FFFF
- FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
- FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00
- }
end
object MnuBordersSeparator4: TMenuItem
Caption = '-'
end
object MnuBordersOuter: TMenuItem
Action = AcBorderOuter
- Bitmap.Data = {
- 36040000424D3604000000000000360000002800000010000000100000000100
- 2000000000000004000064000000640000000000000000000000FFFFFF00FFFF
- FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
- FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
- FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
- FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000
- 00AC000000E6000000E6000000E6000000E6000000E6000000E6000000E60000
- 00E6000000E6000000E6000000E6000000ACFFFFFF00FFFFFF00FFFFFF000000
- 00D9000000000000000000000000000000000000000001010113010101000000
- 0000000000000000000000000000000000D9FFFFFF00FFFFFF00FFFFFF000101
- 01CC010101000101010000000000000000000101010001010189010101000000
- 0000000000000101010001010100010101CCFFFFFF00FFFFFF00FFFFFF000101
- 01C7010101000101010001010100000000000000000000000011000000000000
- 0000010101000101010001010100010101C7FFFFFF00FFFFFF00FFFFFF000101
- 01C4010101000101010000000000000000000000000000000080000000000000
- 0000000000000101010001010100010101C4FFFFFF00FFFFFF00FFFFFF000101
- 01C0010101000000000000000000000000000000000000000010000000000000
- 0000000000000000000001010100010101C0FFFFFF00FFFFFF00FFFFFF000101
- 01BC0000000F000000780000000F000000780000000F000000780000000F0000
- 00780000000F000000780101010F010101BCFFFFFF00FFFFFF00FFFFFF000101
- 01B901010100000000000000000000000000000000000000000F000000000000
- 0000000000000000000001010100010101B9FFFFFF00FFFFFF00FFFFFF000101
- 01B6010101000101010000000000000000000000000000000071000000000000
- 0000000000000101010001010100010101B6FFFFFF00FFFFFF00FFFFFF000101
- 01B301010100010101000101010001010100000000000000000E000000000000
- 0000010101000101010001010100010101B3FFFFFF00FFFFFF00FFFFFF000101
- 01B001010100010101000101010001010100000000000000006B000000000101
- 0100010101000101010001010100010101B0FFFFFF00FFFFFF00FFFFFF000101
- 01AE01010100010101000101010001010100010101000101010D010101000101
- 0100010101000101010001010100010101AEFFFFFF00FFFFFF00FFFFFF000101
- 0181010101AC010101AC010101AC010101AC010101AC010101AC010101AC0101
- 01AC010101AC010101AC010101AC01010181FFFFFF00FFFFFF00FFFFFF00FFFF
- FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
- FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00
- }
end
object MnuBordersOuterThick: TMenuItem
Action = AcBorderOuterMedium
- Bitmap.Data = {
- 36040000424D3604000000000000360000002800000010000000100000000100
- 2000000000000004000064000000640000000000000000000000FFFFFF00FFFF
- FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
- FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
- FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
- FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000
- 00AC000000E6000000E6000000E6000000E6000000E6000000E6000000E60000
- 00E6000000E6000000E6000000E6000000ACFFFFFF00FFFFFF00FFFFFF000000
- 00D9000000D9000000D9000000D9000000D9000000D9000000D9000000D90000
- 00D9000000D9000000D9000000D9000000D9FFFFFF00FFFFFF00FFFFFF000101
- 01CC010101CC0101010000000000000000000000000001010189000000000000
- 00000000000001010100010101CC010101CCFFFFFF00FFFFFF00FFFFFF000101
- 01C7010101C70101010001010100000000000000000000000011000000000000
- 00000101010001010100010101C7010101C7FFFFFF00FFFFFF00FFFFFF000101
- 01C4010101C40101010001010100000000000000000000000080000000000000
- 00000101010001010100010101C4010101C4FFFFFF00FFFFFF00FFFFFF000101
- 01C0010101C00101010000000000000000000000000000000010000000000000
- 00000000000001010100010101C0010101C0FFFFFF00FFFFFF00FFFFFF000101
- 01BC010101BC000000780000000F000000780000000F000000780000000F0000
- 00780000000F00000078010101BC010101BCFFFFFF00FFFFFF00FFFFFF000101
- 01B9010101B9010101000000000000000000000000000000000F000000000000
- 00000000000001010100010101B9010101B9FFFFFF00FFFFFF00FFFFFF000101
- 01B6010101B60101010001010100000000000000000000000071000000000000
- 00000101010001010100010101B6010101B6FFFFFF00FFFFFF00FFFFFF000101
- 01B3010101B3010101000101010001010100010101000000000E000000000101
- 01000101010001010100010101B3010101B3FFFFFF00FFFFFF00FFFFFF000101
- 01B0010101B0010101000101010001010100010101000000006B010101000101
- 01000101010001010100010101B0010101B0FFFFFF00FFFFFF00FFFFFF000101
- 01AE010101AE010101AE010101AE010101AE010101AE010101AE010101AE0101
- 01AE010101AE010101AE010101AE010101AEFFFFFF00FFFFFF00FFFFFF000101
- 0181010101AC010101AC010101AC010101AC010101AC010101AC010101AC0101
- 01AC010101AC010101AC010101AC01010181FFFFFF00FFFFFF00FFFFFF00FFFF
- FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
- FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00
- }
end
object MnuBordersSeparator5: TMenuItem
Caption = '-'
end
object MnuBordersAll: TMenuItem
Action = AcBorderAll
- Bitmap.Data = {
- 36040000424D3604000000000000360000002800000010000000100000000100
- 2000000000000004000064000000640000000000000000000000FFFFFF00FFFF
- FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
- FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
- FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
- FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000
- 00AC000000E6000000E6000000E6000000E6000000E6000000E6000000E60000
- 00E6000000E6000000E6000000E6000000ACFFFFFF00FFFFFF00FFFFFF000000
- 00D90000000000000000000000000000000000000000000000D9000000000000
- 0000000000000000000000000000000000D9FFFFFF00FFFFFF00FFFFFF000101
- 01CC0101010001010100000000000101010001010100010101CC010101000101
- 0100000000000101010001010100010101CCFFFFFF00FFFFFF00FFFFFF000101
- 01C70101010001010100010101000101010001010100010101C7010101000101
- 0100010101000101010001010100010101C7FFFFFF00FFFFFF00FFFFFF000101
- 01C40101010001010100010101000101010001010100010101C4010101000101
- 0100010101000101010001010100010101C4FFFFFF00FFFFFF00FFFFFF000101
- 01C00101010001010100010101000101010001010100010101C0010101000101
- 0100010101000101010001010100010101C0FFFFFF00FFFFFF00FFFFFF000101
- 01BC010101BC010101BC010101BC010101BC010101BC0101018E010101BC0101
- 01BC010101BC010101BC010101BC010101BCFFFFFF00FFFFFF00FFFFFF000101
- 01B90101010001010100010101000101010001010100010101B9010101000101
- 0100010101000101010001010100010101B9FFFFFF00FFFFFF00FFFFFF000101
- 01B60101010001010100010101000101010001010100010101B6010101000101
- 0100010101000101010001010100010101B6FFFFFF00FFFFFF00FFFFFF000101
- 01B30101010001010100010101000101010001010100010101B3010101000101
- 0100010101000101010001010100010101B3FFFFFF00FFFFFF00FFFFFF000101
- 01B00101010001010100010101000101010001010100010101B0010101000101
- 0100010101000101010001010100010101B0FFFFFF00FFFFFF00FFFFFF000101
- 01AE0101010001010100010101000101010001010100010101AE010101000101
- 0100010101000101010001010100010101AEFFFFFF00FFFFFF00FFFFFF000101
- 0181010101AC010101AC010101AC010101AC010101AC010101AC010101AC0101
- 01AC010101AC010101AC010101AC01010181FFFFFF00FFFFFF00FFFFFF00FFFF
- FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
- FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00
- }
end
end
end
diff --git a/components/fpspreadsheet/examples/visual/wikitablemaker/wtmain.pas b/components/fpspreadsheet/examples/visual/wikitablemaker/wtmain.pas
index 90ef9ad30..0779b0e1f 100644
--- a/components/fpspreadsheet/examples/visual/wikitablemaker/wtmain.pas
+++ b/components/fpspreadsheet/examples/visual/wikitablemaker/wtmain.pas
@@ -218,7 +218,7 @@ implementation
uses
TypInfo, LazUtf8, LCLIntf, LCLType, LCLVersion, clipbrd, fpcanvas,
SynHighlighterWikiTable,
- fpsutils, fpsRegFileFormats;
+ fpsutils, fpsReaderWriter;
const
DROPDOWN_COUNT = 24;
diff --git a/components/fpspreadsheet/examples/visual/zoom/zdmain.pas b/components/fpspreadsheet/examples/visual/zoom/zdmain.pas
index 74eac93ad..edbdb1993 100644
--- a/components/fpspreadsheet/examples/visual/zoom/zdmain.pas
+++ b/components/fpspreadsheet/examples/visual/zoom/zdmain.pas
@@ -48,7 +48,7 @@ implementation
{$R *.lfm}
uses
- fpsRegFileFormats;
+ fpsReaderWriter;
const
MOUSEWHEEL_FACTOR = 1.05;
diff --git a/components/fpspreadsheet/fpsnumformatparser.pas b/components/fpspreadsheet/fpsnumformatparser.pas
deleted file mode 100644
index 9435f334c..000000000
--- a/components/fpspreadsheet/fpsnumformatparser.pas
+++ /dev/null
@@ -1,1516 +0,0 @@
-unit fpsNumFormatParser;
-
-{$ifdef fpc}
- {$mode objfpc}{$H+}
-{$endif}
-
-interface
-
-uses
- Classes, SysUtils, fpstypes, fpsNumFormat;
-
-
-const
- psOK = 0;
- psErrNoValidColorIndex = 1;
- psErrNoValidCompareNumber = 2;
- psErrUnknownInfoInBrackets = 3;
- psErrConditionalFormattingNotSupported = 4;
- psErrNoUsableFormat = 5;
- psErrNoValidNumberFormat = 6;
- psErrNoValidDateTimeFormat = 7;
- psErrQuoteExpected = 8;
- psErrMultipleCurrSymbols = 9;
- psErrMultipleFracSymbols = 10;
- psErrMultipleExpChars = 11;
- psErrGeneralExpected = 12;
- psAmbiguousSymbol = 13;
- psErrNoValidTextFormat = 14;
-
-type
-
- { TsNumFormatParser }
-
- TsNumFormatParser = class
- private
- FToken: Char;
- FCurrent: PChar;
- FStart: PChar;
- FEnd: PChar;
- FCurrSection: Integer;
- FStatus: Integer;
- function GetCurrencySymbol: String;
- function GetDecimals: byte;
- function GetFracDenominator: Integer;
- function GetFracInt: Integer;
- function GetFracNumerator: Integer;
- function GetFormatString: String;
- function GetNumFormat: TsNumberFormat;
- function GetParsedSectionCount: Integer;
- function GetParsedSections(AIndex: Integer): TsNumFormatSection;
- procedure SetDecimals(AValue: Byte);
-
- protected
- FFormatSettings: TFormatSettings;
- FSections: TsNumFormatSections;
-
- { Administration while scanning }
- procedure AddElement(AToken: TsNumFormatToken; AText: String); overload;
- procedure AddElement(AToken: TsNumFormatToken; AIntValue: Integer=0; AText: String = ''); overload;
- procedure AddElement(AToken: TsNumFormatToken; AFloatValue: Double); overload;
- procedure AddSection;
- procedure DeleteElement(ASection, AIndex: Integer);
- procedure InsertElement(ASection, AIndex: Integer; AToken: TsNumFormatToken; AText: String); overload;
- procedure InsertElement(ASection, AIndex: Integer; AToken: TsNumFormatToken; AIntValue: Integer); overload;
- procedure InsertElement(ASection, AIndex: Integer; AToken: TsNumFormatToken; AFloatValue: Double); overload;
- function NextToken: Char;
- function PrevToken: Char;
-
- { Scanning/parsing }
- procedure ScanAMPM;
- procedure ScanAndCount(ATestChar: Char; out ACount: Integer);
- procedure ScanBrackets;
- procedure ScanCondition(AFirstChar: Char);
- procedure ScanCurrSymbol;
- procedure ScanDateTime;
- procedure ScanFormat;
- procedure ScanGeneral;
- procedure ScanNumber;
- procedure ScanQuotedText;
- // Main scanner
- procedure Parse(const AFormatString: String);
-
- { Analysis while scanning }
- procedure AnalyzeColor(AValue: String);
- function AnalyzeCurrency(const AValue: String): Boolean;
-
- { Analysis after scanning }
- // General
- procedure CheckSections;
- procedure CheckSection(ASection: Integer);
- procedure FixMonthMinuteToken(var ASection: TsNumFormatSection);
- // Format string
- function BuildFormatString: String; virtual;
-
- public
- constructor Create(const AFormatString: String;
- const AFormatSettings: TFormatSettings);
- destructor Destroy; override;
- procedure ClearAll;
- function GetDateTimeCode(ASection: Integer): String;
- function IsDateTimeFormat: Boolean;
- function IsTimeFormat: Boolean;
- procedure LimitDecimals;
-
- property CurrencySymbol: String read GetCurrencySymbol;
- property Decimals: Byte read GetDecimals write SetDecimals;
- property FormatString: String read GetFormatString;
- property FracDenominator: Integer read GetFracDenominator;
- property FracInt: Integer read GetFracInt;
- property FracNumerator: Integer read GetFracNumerator;
- property NumFormat: TsNumberFormat read GetNumFormat;
- property ParsedSectionCount: Integer read GetParsedSectionCount;
- property ParsedSections[AIndex: Integer]: TsNumFormatSection read GetParsedSections;
- property Status: Integer read FStatus;
- end;
-
-
- function CreateNumFormatParams(ANumFormatStr: String;
- const AFormatSettings: TFormatSettings): TsNumFormatParams;
-
- function ParamsOfNumFormatStr(ANumFormatStr: String;
- const AFormatSettings: TFormatSettings; var AResult: TsNumFormatParams): Integer;
-
-
-implementation
-
-uses
- TypInfo, Math, LazUTF8, fpsCurrency;
-
-
-function CreateNumFormatParams(ANumFormatStr: String;
- const AFormatSettings: TFormatSettings): TsNumFormatParams;
-begin
- Result := TsNumFormatParams.Create;
- ParamsOfNumFormatStr(ANumFormatStr, AFormatSettings, result);
-end;
-
-function ParamsOfNumFormatStr(ANumFormatStr: String;
- const AFormatSettings: TFormatSettings; var AResult: TsNumFormatParams): Integer;
-var
- parser: TsNumFormatParser;
-begin
- Assert(AResult <> nil);
- if ANumFormatstr = 'General' then ANumFormatStr := '';
- parser := TsNumFormatParser.Create(ANumFormatStr, AFormatSettings);
- try
- Result := parser.Status;
- AResult.Sections := parser.FSections;
- finally
- parser.Free;
- end;
-end;
-
-
-{------------------------------------------------------------------------------}
-{ TsNumFormatParser }
-{------------------------------------------------------------------------------}
-
-{@@ ----------------------------------------------------------------------------
- Creates a number format parser for analyzing a formatstring that has been
- read from a spreadsheet file.
-
- If ALocalized is true then the formatstring contains localized decimal
- separator etc.
--------------------------------------------------------------------------------}
-constructor TsNumFormatParser.Create(const AFormatString: String;
- const AFormatSettings: TFormatSettings);
-begin
- inherited Create;
- FFormatSettings := AFormatSettings;
- Parse(AFormatString);
- CheckSections;
- if AFormatString = '' then FSections[0].NumFormat := nfGeneral;
-end;
-
-destructor TsNumFormatParser.Destroy;
-begin
- FSections := nil;
- inherited Destroy;
-end;
-
-procedure TsNumFormatParser.AddElement(AToken: TsNumFormatToken; AText: String);
-var
- n: Integer;
-begin
- n := Length(FSections[FCurrSection].Elements);
- SetLength(FSections[FCurrSection].Elements, n+1);
- FSections[FCurrSection].Elements[n].Token := AToken;
- FSections[FCurrSection].Elements[n].TextValue := AText;
-end;
-
-procedure TsNumFormatParser.AddElement(AToken: TsNumFormatToken;
- AIntValue: Integer=0; AText: String = '');
-var
- n: Integer;
-begin
- n := Length(FSections[FCurrSection].Elements);
- SetLength(FSections[FCurrSection].Elements, n+1);
- FSections[FCurrSection].Elements[n].Token := AToken;
- FSections[FCurrSection].Elements[n].IntValue := AIntValue;
- FSections[FCurrSection].Elements[n].TextValue := AText;
-end;
-
-procedure TsNumFormatParser.AddElement(AToken: TsNumFormatToken; AFloatValue: Double); overload;
-var
- n: Integer;
-begin
- n := Length(FSections[FCurrSection].Elements);
- SetLength(FSections[FCurrSection].Elements, n+1);
- FSections[FCurrSection].Elements[n].Token := AToken;
- FSections[FCurrSection].Elements[n].FloatValue := AFloatValue;
-end;
-
-procedure TsNumFormatParser.AddSection;
-begin
- FCurrSection := Length(FSections);
- SetLength(FSections, FCurrSection + 1);
- with FSections[FCurrSection] do
- SetLength(Elements, 0);
-end;
-
-procedure TsNumFormatParser.AnalyzeColor(AValue: String);
-var
- n: Integer;
-begin
- AValue := lowercase(AValue);
- // Colors
- if AValue = 'red' then
- AddElement(nftColor, ord(scRed))
- else
- if AValue = 'black' then
- AddElement(nftColor, ord(scBlack))
- else
- if AValue = 'blue' then
- AddElement(nftColor, ord(scBlue))
- else
- if AValue = 'white' then
- AddElement(nftColor, ord(scWhite))
- else
- if AValue = 'green' then
- AddElement(nftColor, ord(scGreen))
- else
- if AValue = 'cyan' then
- AddElement(nftColor, ord(scCyan))
- else
- if AValue = 'magenta' then
- AddElement(nftColor, ord(scMagenta))
- else
- if copy(AValue, 1, 5) = 'color' then begin
- AValue := copy(AValue, 6, Length(AValue));
- if not TryStrToInt(trim(AValue), n) then begin
- FStatus := psErrNoValidColorIndex;
- exit;
- end;
- AddElement(nftColor, n);
- end else
- FStatus := psErrUnknownInfoInBrackets;
-end;
-
-function TsNumFormatParser.AnalyzeCurrency(const AValue: String): Boolean;
-begin
- if (FFormatSettings.CurrencyString = '') then
- Result := false
- else
- Result := CurrencyRegistered(AValue);
-end;
-
-{ Creates a formatstring for all sections.
- Note: this implementation is only valid for the fpc and Excel dialects of
- format string. }
-function TsNumFormatParser.BuildFormatString: String;
-var
- i: Integer;
-begin
- if Length(FSections) > 0 then begin
- Result := BuildFormatStringFromSection(FSections[0]);
- for i:=1 to High(FSections) do
- Result := Result + ';' + BuildFormatStringFromSection(FSections[i]);
- end;
-end;
-
-procedure TsNumFormatParser.CheckSections;
-var
- i: Integer;
-begin
- for i:=0 to High(FSections) do
- CheckSection(i);
-
- if (Length(FSections) > 1) and (FSections[1].NumFormat = nfCurrencyRed) then
- for i:=0 to High(FSections) do
- if FSections[i].NumFormat = nfCurrency then
- FSections[i].NumFormat := nfCurrencyRed;
-end;
-
-procedure TsNumFormatParser.CheckSection(ASection: Integer);
-var
- el, i: Integer;
- section: PsNumFormatSection;
- nfs, nfsTest: String;
- nf: TsNumberFormat;
- formats: set of TsNumberFormat;
- isMonthMinute: Boolean;
-begin
- if FStatus <> psOK then
- exit;
-
- section := @FSections[ASection];
- section^.Kind := [];
-
- if (ASection = 0) and (Length(FSections) = 1) and (Length(section^.Elements) = 1)
- and (section^.Elements[0].Token = nftGeneral)
- then begin
- section^.NumFormat := nfGeneral;
- exit;
- end;
-
- i := 0;
- isMonthMinute := false;
-
- for el := 0 to High(section^.Elements) do
- begin
- case section^.Elements[el].Token of
- nftZeroDecs:
- section^.Decimals := section^.Elements[el].IntValue;
- nftIntZeroDigit, nftIntOptDigit, nftIntSpaceDigit:
- i := section^.Elements[el].IntValue;
- nftFracNumSpaceDigit, nftFracNumZeroDigit:
- section^.FracNumerator := section^.Elements[el].IntValue;
- nftFracDenomSpaceDigit, nftFracDenomZeroDigit:
- section^.FracDenominator := section^.Elements[el].IntValue;
- nftFracDenom:
- section^.FracDenominator := -section^.Elements[el].IntValue;
- nftPercent:
- section^.Kind := section^.Kind + [nfkPercent];
- nftExpChar:
- if (nfkExp in section^.Kind) then
- FStatus := psErrMultipleExpChars
- else
- section^.Kind := section^.Kind + [nfkExp];
- nftFactor:
- if section^.Elements[el].IntValue <> 0 then
- begin
- section^.Elements[el].FloatValue := IntPower(10, -3*section^.Elements[el].IntValue);
- section^.Factor := section^.Elements[el].FloatValue;
- section^.Kind := section^.Kind + [nfkHasFactor];
- end;
- nftFracSymbol:
- if (nfkFraction in section^.Kind) then
- FStatus := psErrMultipleFracSymbols
- else
- begin
- section^.Kind := section^.Kind + [nfkFraction];
- section^.FracInt := i;
- end;
- nftCurrSymbol:
- begin
- if (nfkCurrency in section^.Kind) then
- FStatus := psErrMultipleCurrSymbols
- else begin
- section^.Kind := section^.Kind + [nfkCurrency];
- section^.CurrencySymbol := section^.Elements[el].TextValue;
- end;
- end;
- nftYear, nftMonth, nftDay:
- section^.Kind := section^.Kind + [nfkDate];
- nftHour, nftMinute, nftSecond, nftMilliseconds:
- begin
- section^.Kind := section^.Kind + [nfkTime];
- if section^.Elements[el].IntValue < 0 then
- section^.Kind := section^.Kind + [nfkTimeInterval];
- end;
- nftMonthMinute:
- isMonthMinute := true;
- nftColor:
- begin
- section^.Kind := section^.Kind + [nfkHasColor];
- section^.Color := section^.Elements[el].IntValue;
- end;
- nftIntTh:
- section^.Kind := section^.Kind + [nfkHasThSep];
- nftTextFormat:
- section^.Kind := section^.Kind + [nfkText];
- end;
- end; // for
-
- if FStatus <> psOK then
- exit;
-
- if (section^.Kind * [nfkDate, nfkTime] <> []) and
- (section^.Kind * [nfkPercent, nfkExp, nfkCurrency, nfkFraction] <> []) then
- begin
- FStatus := psErrNoValidDateTimeFormat;
- exit;
- end;
-
- if (Length(FSections) = 1) and (section^.Kind = [nfkText]) then begin
- section^.NumFormat := nfText;
- exit;
- end;
-
- section^.NumFormat := nfCustom;
-
- if (section^.Kind * [nfkDate, nfkTime] <> []) or isMonthMinute then
- begin
- FixMonthMinuteToken(section^);
- nfs := GetFormatString;
- if (nfkTimeInterval in section^.Kind) then
- section^.NumFormat := nfTimeInterval
- else
- begin
- formats := [nfShortDateTime, nfLongDate, nfShortDate, nfLongTime,
- nfShortTime, nfLongTimeAM, nfShortTimeAM, nfDayMonth, nfMonthYear];
- for nf in formats do
- begin
- nfsTest := BuildDateTimeFormatString(nf, FFormatSettings);
- if Length(nfsTest) = Length(nfs) then
- begin
- if SameText(nfs, nfsTest) then
- begin
- section^.NumFormat := nf;
- break;
- end;
- for i := 1 to Length(nfsTest) do
- case nfsTest[i] of
- '/': if not (nf in [nfLongTimeAM, nfShortTimeAM]) then
- nfsTest[i] := FFormatSettings.DateSeparator;
- ':': nfsTest[i] := FFormatSettings.TimeSeparator;
- 'n': nfsTest[i] := 'm';
- end;
- if SameText(nfs, nfsTest) then
- begin
- section^.NumFormat := nf;
- break;
- end;
- end;
- end;
- end;
- end else
- begin
- nfs := GetFormatString;
- nfsTest := BuildFractionFormatString(section^.FracInt > 0, section^.FracNumerator, section^.FracDenominator);
- if sameText(nfs, nfsTest) then
- section^.NumFormat := nfFraction
- else
- begin
- formats := [nfFixed, nfFixedTh, nfPercentage, nfExp];
- for nf in formats do begin
- nfsTest := BuildNumberFormatString(nf, FFormatSettings, section^.Decimals);
- if SameText(nfs, nfsTest) then
- begin
- section^.NumFormat := nf;
- break;
- end;
- end;
- end;
- if (section^.NumFormat = nfCustom) and (nfkCurrency in section^.Kind) then
- begin
- section^.NumFormat := nfCurrency;
- if section^.Color = scRed then
- section^.NumFormat := nfCurrencyRed;
- end;
- end;
-end;
-
-procedure TsNumFormatParser.ClearAll;
-var
- i, j: Integer;
-begin
- for i:=0 to Length(FSections)-1 do begin
- for j:=0 to Length(FSections[i].Elements) do
- if FSections[i].Elements <> nil then
- FSections[i].Elements[j].TextValue := '';
- FSections[i].Elements := nil;
- FSections[i].CurrencySymbol := '';
- end;
- FSections := nil;
-end;
-
-procedure TsNumFormatParser.DeleteElement(ASection, AIndex: Integer);
-var
- i, n: Integer;
-begin
- n := Length(FSections[ASection].Elements);
- for i:= AIndex+1 to n-1 do
- FSections[ASection].Elements[i-1] := FSections[ASection].Elements[i];
- SetLength(FSections[ASection].Elements, n-1);
-end;
-
-{ Identify the ambiguous "m" token ("month" or "minute") }
-procedure TsNumFormatParser.FixMonthMinuteToken(var ASection: TsNumFormatSection);
-var
- i, j: Integer;
-
- // Finds the previous date/time element skipping spaces, date/time sep etc.
- function PrevDateTimeElement(j: Integer): Integer;
- begin
- Result := -1;
- dec(j);
- while (j >= 0) do begin
- with ASection.Elements[j] do
- if Token in [nftYear, nftMonth, nftDay, nftHour, nftMinute, nftSecond] then
- begin
- Result := j;
- exit;
- end;
- dec(j);
- end;
- end;
-
- // Finds the next date/time element skipping spaces, date/time sep etc.
- function NextDateTimeElement(j: Integer): Integer;
- begin
- Result := -1;
- inc(j);
- while (j < Length(ASection.Elements)) do begin
- with ASection.Elements[j] do
- if Token in [nftYear, nftMonth, nftDay, nftHour, nftMinute, nftSecond] then
- begin
- Result := j;
- exit;
- end;
- inc(j);
- end;
- end;
-
-begin
- for i:=0 to High(ASection.Elements) do
- begin
- // Find index of nftMonthMinute token...
- if ASection.Elements[i].Token = nftMonthMinute then begin
- // ... and, using its neighbors, decide whether it is a month or a minute.
- j := NextDateTimeElement(i);
- if j <> -1 then
- case ASection.Elements[j].Token of
- nftDay, nftYear:
- begin
- ASection.Elements[i].Token := nftMonth;
- Continue;
- end;
- nftSecond:
- begin
- ASection.Elements[i].Token := nftMinute;
- Continue;
- end;
- end;
- j := PrevDateTimeElement(i);
- if j <> -1 then
- case ASection.Elements[j].Token of
- nftDay, nftYear:
- begin
- ASection.Elements[i].Token := nftMonth;
- Continue;
- end;
- nftHour:
- begin
- ASection.Elements[i].Token := nftMinute;
- Continue;
- end;
- end;
-
- // If we get here the token is isolated. In this case we assume
- // that it is a month - that's the way Excel does it when reading files
- // (for editing of a worksheet, however, Excel distinguishes between
- // uppercase "M" for "month" and lowercase "m" for "minute".)
- ASection.Elements[i].Token := nftMonth;
- Include(ASection.Kind, nfkDate);
- end;
- end;
-end;
-
-procedure TsNumFormatParser.InsertElement(ASection, AIndex: Integer;
- AToken: TsNumFormatToken; AText: String);
-var
- i, n: Integer;
-begin
- n := Length(FSections[ASection].Elements);
- SetLength(FSections[ASection].Elements, n+1);
- for i:= n-1 downto AIndex+1 do
- FSections[ASection].Elements[i+1] := FSections[ASection].Elements[i];
- FSections[ASection].Elements[AIndex+1].Token := AToken;
- FSections[ASection].Elements[AIndex+1].TextValue := AText;
-end;
-
-procedure TsNumFormatParser.InsertElement(ASection, AIndex: Integer;
- AToken: TsNumFormatToken; AIntValue: Integer);
-var
- i, n: Integer;
-begin
- n := Length(FSections[ASection].Elements);
- SetLength(FSections[ASection].Elements, n+1);
- for i:= n-1 downto AIndex+1 do
- FSections[ASection].Elements[i+1] := FSections[ASection].Elements[i];
- FSections[ASection].Elements[AIndex+1].Token := AToken;
- FSections[ASection].Elements[AIndex+1].IntValue := AIntValue;
-end;
-
-procedure TsNumFormatParser.InsertElement(ASection, AIndex: Integer;
- AToken: TsNumFormatToken; AFloatValue: Double);
-var
- i, n: Integer;
-begin
- n := Length(FSections[ASection].Elements);
- SetLength(FSections[ASection].Elements, n+1);
- for i:= n-1 downto AIndex+1 do
- FSections[ASection].Elements[i+1] := FSections[ASection].Elements[i];
- FSections[ASection].Elements[AIndex+1].Token := AToken;
- FSections[ASection].Elements[AIndex+1].FloatValue := AFloatValue;
-end;
-
-function TsNumFormatParser.GetFormatString: String;
-begin
- Result := BuildFormatString;
-end;
-
-{ Extracts the currency symbol form the formatting sections. It is assumed that
- all two or three sections of the currency/accounting format use the same
- currency symbol, otherwise it would be custom format anyway which ignores
- the currencysymbol value. }
-function TsNumFormatParser.GetCurrencySymbol: String;
-begin
- if Length(FSections) > 0 then
- Result := FSections[0].CurrencySymbol
- else
- Result := '';
-end;
-
-{ Creates a string which summarizes the date/time formats in the given section.
- The string contains a 'y' for a nftYear, a 'm' for a nftMonth, a
- 'd' for a nftDay, a 'h' for a nftHour, a 'n' for a nftMinute, a 's' for a
- nftSeconds, and a 'z' for a nftMilliseconds token. The order is retained.
- Needed for biff2 }
-function TsNumFormatParser.GetDateTimeCode(ASection: Integer): String;
-var
- i: Integer;
-begin
- Result := '';
- if ASection < Length(FSections) then
- with FSections[ASection] do begin
- i := 0;
- while i < Length(Elements) do begin
- case Elements[i].Token of
- nftYear : Result := Result + 'y';
- nftMonth : Result := Result + 'm';
- nftDay : Result := Result + 'd';
- nftHour : Result := Result + 'h';
- nftMinute : Result := Result + 'n';
- nftSecond : Result := Result + 's';
- nftMilliSeconds: Result := Result + 'z';
- end;
- inc(i);
- end;
- end;
-end;
-
-{ Extracts the number of decimals from the sections. Since they are needed only
- for default formats having only a single section, only the first section is
- considered. In case of currency/accounting having two or three sections, it is
- assumed that all sections have the same decimals count, otherwise it would not
- be a standard format. }
-function TsNumFormatParser.GetDecimals: Byte;
-begin
- if Length(FSections) > 0 then
- Result := FSections[0].Decimals
- else
- Result := 0;
-end;
-
-function TsNumFormatParser.GetFracDenominator: Integer;
-begin
- if Length(FSections) > 0 then
- Result := FSections[0].FracDenominator
- else
- Result := 0;
-end;
-
-function TsNumFormatParser.GetFracInt: Integer;
-begin
- if Length(FSections) > 0 then
- Result := FSections[0].FracInt
- else
- Result := 0;
-end;
-
-function TsNumFormatParser.GetFracNumerator: Integer;
-begin
- if Length(FSections) > 0 then
- Result := FSections[0].FracNumerator
- else
- Result := 0;
-end;
-
-{ Tries to extract a common builtin number format from the sections. If there
- are multiple sections, it is always a custom format, except for Currency and
- Accounting. }
-function TsNumFormatParser.GetNumFormat: TsNumberFormat;
-begin
- if Length(FSections) = 0 then
- result := nfGeneral
- else begin
- Result := FSections[0].NumFormat;
- if (Result = nfCurrency) then begin
- if Length(FSections) = 2 then begin
- Result := FSections[1].NumFormat;
- if FSections[1].CurrencySymbol <> FSections[0].CurrencySymbol then begin
- Result := nfCustom;
- exit;
- end;
- if (FSections[0].NumFormat in [nfCurrency, nfCurrencyRed]) and
- (FSections[1].NumFormat in [nfCurrency, nfCurrencyRed])
- then
- exit;
- end else
- if Length(FSections) = 3 then begin
- Result := FSections[1].NumFormat;
- if (FSections[0].CurrencySymbol <> FSections[1].CurrencySymbol) or
- (FSections[1].CurrencySymbol <> FSections[2].CurrencySymbol)
- then begin
- Result := nfCustom;
- exit;
- end;
- if (FSections[0].NumFormat in [nfCurrency, nfCurrencyRed]) and
- (FSections[1].NumFormat in [nfCurrency, nfCurrencyRed]) and
- (FSections[2].NumFormat in [nfCurrency, nfCurrencyRed])
- then
- exit;
- end;
- Result := nfCustom;
- exit;
- end;
- if Length(FSections) > 1 then
- Result := nfCustom;
- end;
-end;
-
-function TsNumFormatParser.GetParsedSectionCount: Integer;
-begin
- Result := Length(FSections);
-end;
-
-function TsNumFormatParser.GetParsedSections(AIndex: Integer): TsNumFormatSection;
-begin
- Result := FSections[AIndex];
-end;
- {
-function TsNumFormatParser.GetTokenIntValueAt(AToken: TsNumFormatToken;
- ASection, AIndex: Integer): Integer;
-begin
- if IsTokenAt(AToken, ASection, AIndex) then
- Result := FSections[ASection].Elements[AIndex].IntValue
- else
- Result := -1;
-end;
- }
-{ Returns true if the format elements contain at least one date/time token }
-function TsNumFormatParser.IsDateTimeFormat: Boolean;
-var
- section: TsNumFormatSection;
-begin
- for section in FSections do
- if section.Kind * [nfkDate, nfkTime] <> [] then
- begin
- Result := true;
- exit;
- end;
- Result := false;
-end;
- {
-function TsNumFormatParser.IsNumberAt(ASection, AIndex: Integer;
- out ANumFormat: TsNumberFormat; out ADecimals: Byte;
- out ANextIndex: Integer): Boolean;
-var
- token: TsNumFormatToken;
-begin
- if (ASection > High(FSections)) or (AIndex > High(FSections[ASection].Elements))
- then begin
- Result := false;
- ANextIndex := AIndex;
- exit;
- end;
-
- Result := true;
- ANumFormat := nfCustom;
- ADecimals := 0;
- token := FSections[ASection].Elements[AIndex].Token;
-
- if token in [nftFracNumOptDigit, nftFracNumZeroDigit, nftFracNumSpaceDigit,
- nftFracDenomOptDigit, nftFracDenomZeroDigit, nftFracDenomSpaceDigit] then
- begin
- ANumFormat := nfFraction;
- ANextIndex := AIndex + 1;
- exit;
- end;
-
- if (token = nftIntTh) and (FSections[ASection].Elements[AIndex].IntValue = 1) then // '#,##0'
- ANumFormat := nfFixedTh
- else
- if (token = nftIntZeroDigit) and (FSections[ASection].Elements[AIndex].IntValue = 1) then // '0'
- ANumFormat := nfFixed;
-
- if (token in [nftIntTh, nftIntZeroDigit, nftIntOptDigit, nftIntSpaceDigit]) then
- begin
- if IsTokenAt(nftDecSep, ASection, AIndex+1) then
- begin
- if AIndex + 2 < Length(FSections[ASection].Elements) then
- begin
- token := FSections[ASection].Elements[AIndex+2].Token;
- if (token in [nftZeroDecs, nftOptDecs, nftSpaceDecs]) then
- begin
- ANextIndex := AIndex + 3;
- ADecimals := FSections[ASection].Elements[AIndex+2].IntValue;
- if (token <> nftZeroDecs) then
- ANumFormat := nfCustom;
- exit;
- end;
- end;
- end else
- if IsTokenAt(nftSpace, ASection, AIndex+1) then
- begin
- ANumFormat := nfFraction;
- ANextIndex := AIndex + 1;
- exit;
- end else
- begin
- ANextIndex := AIndex + 1;
- exit;
- end;
- end;
-
- ANextIndex := AIndex;
- Result := false;
-end;
-
-function TsNumFormatParser.IsTextAt(AText: String; ASection, AIndex: Integer): Boolean;
-begin
- Result := IsTokenAt(nftText, ASection, AIndex) and
- (FSections[ASection].Elements[AIndex].TextValue = AText);
-end;
- }
-{ Returns true if the format elements contain only time, no date tokens. }
-function TsNumFormatParser.IsTimeFormat: Boolean;
-var
- section: TsNumFormatSection;
-begin
- for section in FSections do
- if (nfkTime in section.Kind) then
- begin
- Result := true;
- exit;
- end;
- Result := false;
-end;
- {
-function TsNumFormatParser.IsTokenAt(AToken: TsNumFormatToken;
- ASection, AIndex: Integer): Boolean;
-begin
- Result := (ASection < Length(FSections)) and
- (AIndex < Length(FSections[ASection].Elements)) and
- (FSections[ASection].Elements[AIndex].Token = AToken);
-end;
- }
-{ Limits the decimals to 0 or 2, as required by Excel2. }
-procedure TsNumFormatParser.LimitDecimals;
-var
- i, j: Integer;
-begin
- for j:=0 to High(FSections) do
- for i:=0 to High(FSections[j].Elements) do
- if FSections[j].Elements[i].Token = nftZeroDecs then
- if FSections[j].Elements[i].IntValue > 0 then
- FSections[j].Elements[i].IntValue := 2;
-end;
-
-function TsNumFormatParser.NextToken: Char;
-begin
- if FCurrent < FEnd then begin
- inc(FCurrent);
- Result := FCurrent^;
- end else
- Result := #0;
-end;
-
-function TsNumFormatParser.PrevToken: Char;
-begin
- if FCurrent > nil then begin
- dec(FCurrent);
- Result := FCurrent^;
- end else
- Result := #0;
-end;
-
-procedure TsNumFormatParser.Parse(const AFormatString: String);
-begin
- FStatus := psOK;
-
- AddSection;
- if (AFormatString = '') then
- begin
- AddElement(nftGeneral);
- exit;
- end;
-
- FStart := @AFormatString[1];
- FEnd := FStart + Length(AFormatString);
- FCurrent := FStart;
- FToken := FCurrent^;
- while (FCurrent < FEnd) and (FStatus = psOK) do begin
- case FToken of
- 'G','g': ScanGeneral;
- '[': ScanBrackets;
- '"': ScanQuotedText;
- ':': AddElement(nftDateTimeSep, ':');
- ';': AddSection;
- else ScanFormat;
- end;
- FToken := NextToken;
- end;
-end;
-
-{ Scans an AM/PM sequence (or AMPM or A/P).
- At exit, cursor is a next character }
-procedure TsNumFormatParser.ScanAMPM;
-var
- s: String;
- el: Integer;
-begin
- s := '';
- while (FCurrent < FEnd) do begin
- if (FToken in ['A', 'a', 'P', 'p', 'm', 'M', '/']) then
- s := s + FToken
- else
- break;
- FToken := NextToken;
- end;
- if s <> '' then
- begin
- AddElement(nftAMPM, s);
- // Tag the hour element for AM/PM format needed
- el := High(FSections[FCurrSection].Elements)-1;
- for el := High(FSections[FCurrSection].Elements)-1 downto 0 do
- if FSections[FCurrSection].Elements[el].Token = nftHour then
- begin
- FSections[FCurrSection].Elements[el].TextValue := 'AM';
- break;
- end;
- end;
-end;
-
-{ Counts the number of characters equal to ATestChar. Stops at the next
- different character. This is also where the cursor is at exit. }
-procedure TsNumFormatParser.ScanAndCount(ATestChar: Char; out ACount: Integer);
-begin
- ACount := 0;
- if FToken <> ATestChar then
- exit;
- repeat
- inc(ACount);
- FToken := NextToken;
- until (FToken <> ATestChar) or (FCurrent >= FEnd);
-end;
-
-{ Extracts the text between square brackets. This can be
- - a time duration like [hh]
- - a condition, like [>= 2.0]
- - a currency symbol like [$€-409]
- - a color like [red] or [color25]
- The procedure is left with the cursor at ']' }
-procedure TsNumFormatParser.ScanBrackets;
-var
- s: String;
- n: Integer;
- prevtok: Char;
- isText: Boolean;
-begin
- s := '';
- isText := false;
- FToken := NextToken; // Cursor was at '['
- while (FCurrent < FEnd) and (FStatus = psOK) do begin
- case FToken of
- 'h', 'H', 'm', 'M', 'n', 'N', 's', 'S':
- if isText then
- s := s + FToken
- else
- begin
- prevtok := FToken;
- ScanAndCount(FToken, n);
- if (FToken in [']', #0]) then begin
- case prevtok of
- 'h', 'H' : AddElement(nftHour, -n);
- 'm', 'M', 'n', 'N': AddElement(nftMinute, -n);
- 's', 'S' : AddElement(nftSecond, -n);
- end;
- break;
- end else
- FStatus := psErrUnknownInfoInBrackets;
- end;
-
- '<', '>', '=':
- begin
- ScanCondition(FToken);
- if FToken = ']' then
- break
- else
- FStatus := psErrUnknownInfoInBrackets;
- end;
-
- '$':
- begin
- ScanCurrSymbol;
- if FToken = ']' then
- break
- else
- FStatus := psErrUnknownInfoInBrackets;
- end;
-
- ']':
- begin
- AnalyzeColor(s);
- break;
- end;
-
- else
- s := s + FToken;
- isText := true;
- end;
- FToken := NextToken;
- end;
-end;
-
-{ Scans a condition like [>=2.0]. Starts after the "[" and ends before at "]".
- Returns first character after the number (spaces allowed). }
-procedure TsNumFormatParser.ScanCondition(AFirstChar: Char);
-var
- s: String;
-// op: TsCompareOperation;
- value: Double;
- res: Integer;
-begin
- s := AFirstChar;
- FToken := NextToken;
- if FToken in ['>', '<', '='] then s := s + FToken else FToken := PrevToken;
- {
- if s = '=' then op := coEqual else
- if s = '<>' then op := coNotEqual else
- if s = '<' then op := coLess else
- if s = '>' then op := coGreater else
- if s = '<=' then op := coLessEqual else
- if s = '>=' then op := coGreaterEqual
- else begin
- FStatus := psErrUnknownInfoInBrackets;
- FToken := #0;
- exit;
- end;
- }
- while (FToken = ' ') and (FCurrent < FEnd) do
- FToken := NextToken;
-
- if FCurrent >= FEnd then begin
- FStatus := psErrUnknownInfoInBrackets;
- FToken := #0;
- exit;
- end;
-
- s := FToken;
- while (FCurrent < FEnd) and (FToken in ['+', '-', '.', '0'..'9']) do begin
- FToken := NextToken;
- s := s + FToken;
- end;
- val(s, value, res);
- if res <> 0 then begin
- FStatus := psErrUnknownInfoInBrackets;
- FToken := #0;
- exit;
- end;
-
- while (FCurrent < FEnd) and (FToken = ' ') do
- FToken := NextToken;
- if FToken = ']' then
- AddElement(nftCompareOp, value)
- else begin
- FStatus := psErrUnknownInfoInBrackets;
- FToken := #0;
- end;
-end;
-
-{ Scans to end of a symbol like [$EUR-409], starting after the $ and ending at
- the "]".
- After the "$" follows the currency symbol, after the "-" country information }
-procedure TsNumFormatParser.ScanCurrSymbol;
-var
- s: String;
-begin
- s := '';
- FToken := NextToken;
- while (FCurrent < FEnd) and not (FToken in ['-', ']']) do begin
- s := s + FToken;
- FToken := NextToken;
- end;
- if s <> '' then
- AddElement(nftCurrSymbol, s);
- if FToken <> ']' then begin
- FToken := NextToken;
- while (FCurrent < FEnd) and (FToken <> ']') do begin
- s := s + FToken;
- FToken := NextToken;
- end;
- if s <> '' then
- AddElement(nftCountry, s);
- end;
-end;
-
-{ Scans a date/time format. Procedure is left with the cursor at the last char
- of the date/time format. }
-procedure TsNumFormatParser.ScanDateTime;
-var
- n: Integer;
- token: Char;
-begin
- while (FCurrent < FEnd) and (FStatus = psOK) do begin
- case FToken of
- '\': // means that the next character is taken literally
- begin
- FToken := NextToken; // skip the "\"...
- AddElement(nftEscaped, FToken);
- FToken := NextToken;
- end;
- 'Y', 'y':
- begin
- ScanAndCount(FToken, n);
- AddElement(nftYear, n);
- end;
- 'm', 'M', 'n', 'N':
- begin
- token := FToken;
- ScanAndCount(FToken, n);
- AddElement(nftMonthMinute, n, token); // Decide on minute or month later
- end;
- 'D', 'd':
- begin
- ScanAndCount(FToken, n);
- AddElement(nftDay, n);
- end;
- 'H', 'h':
- begin
- ScanAndCount(FToken, n);
- AddElement(nftHour, n);
- end;
- 'S', 's':
- begin
- ScanAndCount(FToken, n);
- AddElement(nftSecond, n);
- end;
- '/', ':':
- begin
- AddElement(nftDateTimeSep, FToken);
- FToken := NextToken;
- end;
- '.':
- begin
- token := NextToken;
- if token in ['z', '0'] then begin
- AddElement(nftDecSep, FToken);
- FToken := NextToken;
- ScanAndCount(FToken, n);
- AddElement(nftMilliseconds, n);
- end else begin
- AddElement(nftDateTimeSep, FToken);
- FToken := token;
- end;
- end;
- '[':
- begin
- ScanBrackets;
- FToken := NextToken;
- end;
- 'A', 'a':
- ScanAMPM;
- ',', '-':
- begin
- AddElement(nftText, FToken);
- FToken := NextToken;
- end
- else
- // char pointer must be at end of date/time mask.
- FToken := PrevToken;
- Exit;
- end;
- end;
-end;
-
-procedure TsNumFormatParser.ScanFormat;
-var
- done: Boolean;
- n: Integer;
- uch: Cardinal;
-begin
- done := false;
- while (FCurrent < FEnd) and (FStatus = psOK) and (not done) do begin
- case FToken of
- '\': // Excel: add next character literally
- begin
- FToken := NextToken;
- AddElement(nftText, FToken);
- end;
- '*': // Excel: repeat next character to fill cell. For accounting format.
- begin
- FToken := NextToken;
- AddElement(nftRepeat, FToken);
- end;
- '_': // Excel: Leave width of next character empty
- begin
- FToken := NextToken;
- uch := UTF8CharacterToUnicode(FCurrent, n);
- if n > 1 then
- begin
- AddElement(nftEmptyCharWidth, UnicodeToUTF8(uch));
- inc(FCurrent, n-1);
- FToken := NextToken;
- Continue;
- end else
- AddElement(nftEmptyCharWidth, FToken);
- end;
- '@': // Excel: Indicates text format
- begin
- AddElement(nftTextFormat, FToken);
- end;
- '"':
- ScanQuotedText;
- '(', ')':
- AddElement(nftSignBracket, FToken);
- '0', '#', '?', '.', ',', '-':
- ScanNumber;
- 'y', 'Y', 'm', 'M', 'd', 'D', 'h', 'N', 'n', 's':
- ScanDateTime;
- '[':
- ScanBrackets;
- ' ':
- AddElement(nftSpace, FToken);
- 'A', 'a':
- begin
- ScanAMPM;
- FToken := PrevToken;
- end;
- 'G', 'g':
- ScanGeneral;
- ';': // End of the section. Important: Cursor must stay on ';'
- begin
- AddSection;
- Exit;
- end;
- else
- uch := UTF8CharacterToUnicode(FCurrent, n);
- if n > 1 then
- begin
- AddElement(nftText, UnicodeToUTF8(uch));
- inc(FCurrent, n-1);
- end else
- AddElement(nftText, FToken);
- end;
- FToken := NextToken;
- end;
-end;
-
-{ Scans for the word "General", it may be used like other tokens }
-procedure TsNumFormatParser.ScanGeneral;
-begin
- FStatus := psErrGeneralExpected;
- FToken := NextToken;
- if not (FToken in ['e', 'E']) then exit;
- FToken := NextToken;
- if not (FToken in ['n', 'N']) then exit;
- FToken := NextToken;
- if not (FToken in ['e', 'E']) then exit;
- FToken := NextToken;
- if not (FToken in ['r', 'R']) then exit;
- FToken := NextToken;
- if not (FToken in ['a', 'A']) then exit;
- FToken := NextToken;
- if not (FToken in ['l', 'L']) then exit;
- AddElement(nftGeneral);
- FStatus := psOK;
-end;
-
-{ Scans a floating point format. Procedure is left with the cursor at the last
- character of the format. }
-procedure TsNumFormatParser.ScanNumber;
-var
- hasDecSep: Boolean;
- isFrac: Boolean;
- n, m: Integer;
- el: Integer;
- savedCurrent: PChar;
- thSep: Char;
-begin
- hasDecSep := false;
- isFrac := false;
- thSep := ',';
- while (FCurrent < FEnd) and (FStatus = psOK) do begin
- case FToken of
- ',': AddElement(nftThSep, ',');
- '.': begin
- AddElement(nftDecSep, '.');
- hasDecSep := true;
- end;
- '#': begin
- ScanAndCount('#', n);
- savedCurrent := FCurrent;
- if not (hasDecSep or isFrac) and (n = 1) and (FToken = thSep) then
- begin
- m := 0;
- FToken := NextToken;
- ScanAndCount('#', n);
- case n of
- 0: begin
- ScanAndCount('0', n);
- ScanAndCount(thSep, m);
- FToken := prevToken;
- if n = 3 then
- AddElement(nftIntTh, 3, ',')
- else
- FCurrent := savedCurrent;
- end;
- 1: begin
- ScanAndCount('0', n);
- ScanAndCount(thSep, m);
- FToken := prevToken;
- if n = 2 then
- AddElement(nftIntTh, 2, ',')
- else
- FCurrent := savedCurrent;
- end;
- 2: begin
- ScanAndCount('0', n);
- ScanAndCount(thSep, m);
- FToken := prevToken;
- if (n = 1) then
- AddElement(nftIntTh, 1, ',')
- else
- FCurrent := savedCurrent;
- end;
- end;
- if m > 0 then
- AddElement(nftFactor, m, thSep);
- end else
- begin
- FToken := PrevToken;
- if isFrac then
- AddElement(nftFracDenomOptDigit, n)
- else
- if hasDecSep then
- AddElement(nftOptDecs, n)
- else
- AddElement(nftIntOptDigit, n);
- end;
- end;
- '0': begin
- ScanAndCount('0', n);
- ScanAndCount(thSep, m);
- FToken := PrevToken;
- if hasDecSep then
- AddElement(nftZeroDecs, n)
- else
- if isFrac then
- AddElement(nftFracDenomZeroDigit, n)
- else
- AddElement(nftIntZeroDigit, n);
- if m > 0 then
- AddElement(nftFactor, m, thSep);
- end;
- '1'..'9':
- begin
- if isFrac then
- begin
- n := 0;
- while (FToken in ['1'..'9','0']) do
- begin
- n := n*10 + StrToInt(FToken);
- FToken := nextToken;
- end;
- AddElement(nftFracDenom, n);
- end else
- AddElement(nftText, FToken);
- end;
- '?': begin
- ScanAndCount('?', n);
- FToken := PrevToken;
- if hasDecSep then
- AddElement(nftSpaceDecs, n)
- else
- if isFrac then
- AddElement(nftFracDenomSpaceDigit, n)
- else
- AddElement(nftIntSpaceDigit, n);
- end;
- 'E', 'e':
- begin
- AddElement(nftExpChar, FToken);
- FToken := NextToken;
- if FToken in ['+', '-'] then
- AddElement(nftExpSign, FToken);
- FToken := NextToken;
- if FToken = '0' then begin
- ScanAndCount('0', n);
- FToken := PrevToken;
- AddElement(nftExpDigits, n);
- end;
- end;
- '+', '-':
- AddElement(nftSign, FToken);
- '%': AddElement(nftPercent, FToken);
- '/': begin
- isFrac := true;
- AddElement(nftFracSymbol, FToken);
- // go back and replace correct token for numerator
- el := High(FSections[FCurrSection].Elements);
- while el > 0 do begin
- dec(el);
- case FSections[FCurrSection].Elements[el].Token of
- nftIntOptDigit:
- begin
- FSections[FCurrSection].Elements[el].Token := nftFracNumOptDigit;
- break;
- end;
- nftIntSpaceDigit:
- begin
- FSections[FCurrSection].Elements[el].Token := nftFracNumSpaceDigit;
- break;
- end;
- nftIntZeroDigit:
- begin
- FSections[FCurrSection].Elements[el].Token := nftFracNumZeroDigit;
- break;
- end;
- end;
- end;
- end;
- 'G', 'g':
- ScanGeneral;
- else
- FToken := PrevToken;
- Exit;
- end;
- FToken := NextToken;
- end;
-end;
-
-{ Scans a text in quotation marks. Tries to interpret the text as a currency
- symbol (--> AnalyzeText).
- The procedure is entered and left with the cursor at a quotation mark. }
-procedure TsNumFormatParser.ScanQuotedText;
-var
- s: String;
-begin
- s := '';
- FToken := NextToken; // Cursor war at '"'
- while (FCurrent < FEnd) and (FStatus = psOK) do begin
- if FToken = '"' then begin
- if AnalyzeCurrency(s) then
- AddElement(nftCurrSymbol, s)
- else
- AddElement(nftText, s);
- exit;
- end else begin
- s := s + FToken;
- FToken := NextToken;
- end;
- end;
- // When the procedure gets here the final quotation mark is missing
- FStatus := psErrQuoteExpected;
-end;
-
-procedure TsNumFormatParser.SetDecimals(AValue: Byte);
-var
- i, j, n: Integer;
- foundDecs: Boolean;
-begin
- foundDecs := false;
- for j := 0 to High(FSections) do begin
- n := Length(FSections[j].Elements);
- i := n-1;
- while (i > -1) do begin
- case FSections[j].Elements[i].Token of
- nftDecSep: // this happens, e.g., for "0.E+00"
- if (AValue > 0) and not foundDecs then begin
- InsertElement(j, i, nftZeroDecs, AValue);
- break;
- end;
- nftIntOptDigit, nftIntZeroDigit, nftIntSpaceDigit, nftIntTh:
- // no decimals so far --> add decimal separator and decimals element
- if (AValue > 0) then begin
- // Don't use "AddElements" because nfCurrency etc have elements after the number.
- InsertElement(j, i, nftDecSep, '.');
- InsertElement(j, i+1, nftZeroDecs, AValue);
- break;
- end;
- nftZeroDecs, nftOptDecs, nftSpaceDecs:
- begin
- foundDecs := true;
- if AValue > 0 then begin
- // decimals are already used, just replace value of decimal places
- FSections[j].Elements[i].IntValue := AValue;
- FSections[j].Elements[i].Token := nftZeroDecs;
- break;
- end else begin
- // No decimals any more: delete decs and decsep elements
- DeleteElement(j, i);
- DeleteElement(j, i-1);
- break;
- end;
- end;
- end;
- dec(i);
- end;
- end;
-end;
-
-end.
diff --git a/components/fpspreadsheet/fpsregfileformats.pas b/components/fpspreadsheet/fpsregfileformats.pas
deleted file mode 100644
index 12b834c7c..000000000
--- a/components/fpspreadsheet/fpsregfileformats.pas
+++ /dev/null
@@ -1,572 +0,0 @@
-{@@ ----------------------------------------------------------------------------
- Unit fpsRegFileFormats implements registration of the file formats supported
- by fpspreadsheet.
-
- AUTHORS: Felipe Monteiro de Carvalho, Reinier Olislagers, Werner Pamler
-
- LICENSE: See the file COPYING.modifiedLGPL.txt, included in the Lazarus
- distribution, for details about the license.
-
- USAGE: Each unit implementing a new spreadsheet format must register the
- reader/writer and some specific data by calling "RegisterSpreadFormat".
--------------------------------------------------------------------------------}
-unit fpsRegFileFormats;
-
-{$mode objfpc}{$H+}
-
-interface
-
-uses
- Classes, SysUtils, fpstypes, fpsReaderWriter; //fpspreadsheet;
-
-type
- TsSpreadFileAccess = (faRead, faWrite);
-
-function RegisterSpreadFormat(
- AFormat: TsSpreadsheetFormat;
- AReaderClass: TsSpreadReaderClass;
- AWriterClass: TsSpreadWriterClass;
- AFormatName, ATechnicalName: String;
- const AFileExtensions: array of String): TsSpreadFormatID;
-
-function GetFileFormatFilter(AListSeparator, AExtSeparator: Char;
- AFileAccess: TsSpreadFileAccess; const APriorityFormats: array of TsSpreadFormatID;
- AllSpreadFormats: Boolean = false; AllExcelFormats: Boolean = false): String;
-
-function GetSpreadFormats(AFileAccess: TsSpreadFileAccess;
- const APriorityFormats: array of TsSpreadFormatID): TsSpreadFormatIDArray;
-function GetSpreadFormatsFromFileName(AFileAccess: TsSpreadFileAccess; AFileName: TFileName;
- APriorityFormat: TsSpreadFormatID = sfidUnknown): TsSpreadFormatIDArray;
-
-function GetSpreadFormatExt(AFormatID: TsSpreadFormatID): String;
-function GetSpreadFormatName(AFormatID: TsSpreadFormatID): String;
-function GetSpreadTechnicalName(AFormatID: TsSpreadFormatID): String;
-
-function GetSpreadReaderClass(AFormatID: TsSpreadFormatID): TsSpreadReaderClass;
-function GetSpreadWriterClass(AFormatID: TsSpreadFormatID): TsSpreadWriterClass;
-
-
-implementation
-
-uses
- fpsStrings;
-
-type
- TsSpreadFormatData = class
- private
- FFormatID: TsSpreadFormatID; // Format identifier
- FName: String; // Text to be used in FileDialog filter
- FTechnicalName: String; // Text to be used e.g. in Titlebar
- FFileExtensions: array of String; // File extensions used by this format
- FReaderClass: TsSpreadReaderClass; // Class for reading these files
- FWriterClass: TsSpreadWriterClass; // Class for writing these files
- function GetFileExtension(AIndex: Integer): String;
- function GetFileExtensionCount: Integer;
- public
- constructor Create(AFormatID: TsSpreadFormatID; AReaderClass: TsSpreadReaderClass;
- AWriterClass: TsSpreadWriterClass; AFormatName, ATechnicalName: String;
- const AExtensions: Array of String);
-// ACanReadFromClipboard, ACanWriteToClipboard: Boolean);
- function GetFileFilterMask(ASeparator: Char): String;
-
-// property CanReadFromClipboard: boolean read FCanReadClipboard;
-// property CanWriteToClipboard: boolean read FCanWriteClipboard;
- property FormatID: TsSpreadFormatID read FFormatID;
- property FormatName: String read FName;
- property FileExtension[AIndex: Integer]: String read GetFileExtension;
- property FileExtensionCount: Integer read GetFileExtensionCount;
- property ReaderClass: TsSpreadReaderClass read FReaderClass;
- property TechnicalName: String read FTechnicalName;
- property WriterClass: TsSpreadWriterClass read FWriterClass;
- end;
-
- { TsSpreadFormatRegistry }
-
- TsSpreadFormatRegistry = class
- private
- FList: TFPList;
- FCachedData: TsSpreadFormatData;
- FCachedFormatID: TsSpreadFormatID;
- function GetDefaultExt(AFormatID: TsSpreadFormatID): String;
- function GetFormatName(AFormatID: TsSpreadFormatID): String;
- function GetReaderClass(AFormatID: TsSpreadFormatID): TsSpreadReaderClass;
- function GetTechnicalName(AFormatID: TsSpreadFormatID): String;
- function GetWriterClass(AFormatID: TsSpreadFormatID): TsSpreadWriterClass;
- protected
- function Add(AData: TsSpreadFormatData): Integer;
- function FindFormatID(AFormatID: TsSpreadFormatID): TsSpreadFormatData;
- function IndexOf(AFormatID: TsSpreadFormatID): Integer;
- public
- constructor Create;
- destructor Destroy; override;
- function GetAllSpreadFilesMask(AExtSeparator: Char;
- AFileAccess: TsSpreadFileAccess): String;
- function GetAllExcelFilesMask(AExtSeparator: Char): String;
- function GetFileFilter(AListSeparator, AExtSeparator: Char;
- AFileAccess: TsSpreadFileAccess; const APriorityFormats: array of TsSpreadFormatID;
- AllSpreadFormats: Boolean = false; AllExcelFormats: Boolean = false): String;
- function GetFormatArray(AFileAccess: TsSpreadFileAccess;
- const APriorityFormats: array of TsSpreadFormatID): TsSpreadFormatIDArray;
- function GetFormatArrayFromFileName(AFileAccess: TsSpreadFileAccess;
- const AFileName: String; APriorityFormat: TsSpreadFormatID = sfidUnknown): TsSpreadFormatIDArray;
-
- property DefaultExt[AFormatID: TsSpreadFormatID]: String read GetDefaultExt;
- property FormatName[AFormatID: TsSpreadFormatID]: String read GetFormatName;
- property ReaderClass[AFormatID: TsSpreadFormatID]: TsSpreadReaderClass read GetReaderClass;
- property TechnicalName[AFormatID: TsSpreadFormatID]: String read GetTechnicalName;
- property WriterClass[AFormatID: TsSpreadFormatID]: TsSpreadWriterClass read GetWriterClass;
- end;
-
-var
- SpreadFormatRegistry: TsSpreadFormatRegistry;
-
-{==============================================================================}
-{ TsSpreadFormatData }
-{==============================================================================}
-
-constructor TsSpreadFormatData.Create(AFormatID: TsSpreadFormatID;
- AReaderClass: TsSpreadReaderClass; AWriterClass: TsSpreadWriterClass;
- AFormatName, ATechnicalName: String; const AExtensions: array of String);
-var
- i: Integer;
-begin
- FFormatID := AFormatID;
- FReaderClass := AReaderClass;
- FWriterClass := AWriterClass;
- FName := AFormatName;
- FTechnicalName := ATechnicalName;
- SetLength(FFileExtensions, Length(AExtensions));
- for i:=0 to High(FFileExtensions) do FFileExtensions[i] := AExtensions[i];
-end;
-
-function TsSpreadFormatData.GetFileExtension(AIndex: Integer): String;
-begin
- Result := FFileExtensions[AIndex];
-end;
-
-function TsSpreadFormatData.GetFileExtensionCount: Integer;
-begin
- Result := Length(FFileExtensions);
-end;
-
-function TsSpreadFormatData.GetFileFilterMask(ASeparator: Char): String;
-var
- i: Integer;
-begin
- Result := '*' + FFileExtensions[0];
- for i:= 1 to High(FFileExtensions) do
- Result := Result + ASeparator + '*' + FFileExtensions[i];
-end;
-
-
-{==============================================================================}
-{ TsSpreadFormatRegistry }
-{==============================================================================}
-
-constructor TsSpreadFormatRegistry.Create;
-begin
- inherited;
- FList := TFPList.Create;
- FCachedFormatID := sfidUnknown;
- FCachedData := nil;
-end;
-
-destructor TsSpreadFormatRegistry.Destroy;
-var
- i: Integer;
-begin
- for i := FList.Count-1 downto 0 do TObject(FList[i]).Free;
- FList.Free;
-
- inherited;
-end;
-
-function TsSpreadFormatRegistry.Add(AData: TsSpreadFormatData): Integer;
-begin
- Result := FList.Add(AData);
-end;
-
-function TsSpreadFormatRegistry.FindFormatID(AFormatID: TsSpreadFormatID): TsSpreadFormatData;
-var
- idx: Integer;
-begin
- if AFormatID <> FCachedFormatID then
- begin
- idx := IndexOf(AFormatID);
- if idx = -1 then
- begin
- FCachedData := nil;
- FCachedFormatID := sfidUnknown;
- end else
- begin
- FCachedData := TsSpreadFormatData(FList[idx]);
- FCachedFormatID := AFormatID;
- end;
- end;
- Result := FCachedData;
-end;
-
-function TsSpreadFormatRegistry.GetDefaultExt(AFormatID: TsSpreadFormatID): String;
-var
- data: TsSpreadFormatData;
-begin
- data := FindFormatID(AFormatID);
- if data <> nil then
- Result := data.FileExtension[0] else
- Result := '';
-end;
-
-function TsSpreadFormatRegistry.GetAllSpreadFilesMask(AExtSeparator: Char;
- AFileAccess: TsSpreadFileAccess): String;
-var
- L: TStrings;
- data: TsSpreadFormatData;
- ext: String;
- i, j: Integer;
-begin
- Result := '';
- L := TStringList.Create;
- try
- for i:=0 to FList.Count-1 do
- begin
- data := TsSpreadFormatData(FList[i]);
- case AFileAccess of
- faRead : if data.ReaderClass = nil then continue;
- faWrite : if data.WriterClass = nil then continue;
- end;
- for j:=0 to data.FileExtensionCount-1 do
- begin
- ext := data.FileExtension[j];
- if L.IndexOf(ext) = -1 then
- L.Add(ext);
- end;
- end;
- if L.Count > 0 then
- begin
- Result := '*' + L[0];
- for i := 1 to L.Count-1 do
- Result := Result + AExtSeparator + '*' + L[i];
- end;
- finally
- L.Free;
- end;
-end;
-
-function TsSpreadFormatRegistry.GetAllExcelFilesMask(AExtSeparator: Char): String;
-var
- j: Integer;
- L: TStrings;
- data: TsSpreadFormatData;
- ext: String;
-begin
- L := TStringList.Create;
- try
- // good old BIFF...
- if (IndexOf(ord(sfExcel8)) <> -1) or
- (IndexOf(ord(sfExcel5)) <> -1) or
- (IndexOf(ord(sfExcel2)) <> -1) then L.Add('*.xls');
-
- // Excel 2007+
- j := IndexOf(ord(sfOOXML));
- if j <> -1 then
- begin
- data := TsSpreadFormatData(FList[j]);
- for j:=0 to data.FileExtensionCount-1 do
- begin
- ext := data.FileExtension[j];
- if L.IndexOf(ext) = -1 then
- L.Add('*' + ext);
- end;
- end;
-
- L.Delimiter := AExtSeparator;
- L.StrictDelimiter := true;
- Result := L.DelimitedText;
- finally
- L.Free;
- end;
-end;
-
-function TsSpreadFormatRegistry.GetFileFilter(AListSeparator, AExtSeparator: Char;
- AFileAccess: TsSpreadFileAccess; const APriorityFormats: array of TsSpreadFormatID;
- AllSpreadFormats: Boolean = false; AllExcelFormats: Boolean = false): String;
-var
- i, idx: Integer;
- L: TStrings;
- s: String;
- data: TsSpreadFormatData;
-begin
- // Bring the formats listed in APriorityFormats to the top
- if Length(APriorityFormats) > 0 then
- for i := High(APriorityFormats) downto Low(APriorityFormats) do
- begin
- idx := IndexOf(APriorityFormats[i]);
- data := TsSpreadFormatData(FList[idx]);
- FList.Delete(idx);
- FList.Insert(0, data);
- end;
-
- L := TStringList.Create;
- try
- L.Delimiter := AListSeparator;
- L.StrictDelimiter := true;
- if AllSpreadFormats then
- begin
- s := GetAllSpreadFilesMask(AExtSeparator, AFileAccess);
- if s <> '' then
- begin
- L.Add(rsAllSpreadsheetFiles);
- L.Add(GetAllSpreadFilesMask(AExtSeparator, AFileAccess));
- end;
- end;
- if AllExcelFormats then
- begin
- s := GetAllExcelFilesMask(AExtSeparator);
- if s <> '' then
- begin
- L.Add(Format('%s (%s)', [rsAllExcelFiles, s]));
- L.Add(s);
- end;
- end;
- for i:=0 to FList.Count-1 do
- begin
- data := TsSpreadFormatData(FList[i]);
- case AFileAccess of
- faRead : if data.ReaderClass = nil then Continue;
- faWrite : if data.WriterClass = nil then Continue;
- end;
- s := data.GetFileFilterMask(AExtSeparator);
- L.Add(Format('%s %s (%s)', [data.FormatName, rsFiles, s]));
- L.Add(s);
- end;
- Result := L.DelimitedText;
- finally
- L.Free;
- end;
-end;
-
-function TsSpreadFormatRegistry.GetFormatArray(AFileAccess: TsSpreadFileAccess;
- const APriorityFormats: array of TsSpreadFormatID): TsSpreadFormatIDArray;
-var
- i, n, idx: Integer;
- data: TsSpreadFormatData;
-begin
- // Rearrange the formats such the one noted in APriorityFormats are at the top
- if Length(APriorityFormats) > 0 then
- for i := High(APriorityFormats) downto Low(APriorityFormats) do
- begin
- idx := IndexOf(APriorityFormats[i]);
- data := TsSpreadFormatData(FList[idx]);
- FList.Delete(idx);
- FList.Insert(0, data);
- end;
-
- SetLength(Result, FList.Count);
- n := 0;
- for i := 0 to FList.Count-1 do
- begin
- data := TsSpreadFormatData(FList[i]);
- case AFileAccess of
- faRead : if data.ReaderClass = nil then Continue;
- faWrite : if data.WriterClass = nil then Continue;
- end;
- Result[n] := data.FormatID;
- inc(n);
- end;
- SetLength(Result, n);
-end;
-
-function TsSpreadFormatRegistry.GetFormatArrayFromFileName(
- AFileAccess: TsSpreadFileAccess; const AFileName: String;
- APriorityFormat: TsSpreadFormatID = sfidUnknown): TsSpreadFormatIDArray;
-var
- idx: Integer;
- i, j, n: Integer;
- ext: String;
- data: TsSpreadFormatData;
-begin
- ext := Lowercase(ExtractFileExt(AFileName));
-
- if APriorityFormat <> sfidUnknown then
- begin
- // Bring the priority format to the top
- idx := IndexOf(APriorityFormat);
- FList.Exchange(0, idx);
- end;
-
- SetLength(Result, FList.Count);
- n := 0;
- for i := 0 to FList.Count - 1 do
- begin
- data := TsSpreadFormatData(FList[i]);
- case AFileAccess of
- faRead : if data.ReaderClass = nil then Continue;
- faWrite : if data.WriterClass = nil then Continue;
- end;
- for j:=0 to data.FileExtensionCount-1 do
- if Lowercase(data.FileExtension[j]) = ext then
- begin
- Result[n] := data.FormatID;
- inc(n);
- end;
- end;
-
-
- SetLength(Result, n);
-
- if APriorityFormat <> sfidUnknown then
- // Restore original order
- FList.Exchange(idx, 0);
-end;
-
-function TsSpreadFormatRegistry.GetFormatName(AFormatID: TsSpreadFormatID): String;
-var
- data: TsSpreadFormatData;
-begin
- data := FindFormatID(AFormatID);
- if data <> nil then
- Result := data.FormatName else
- Result := '';
-end;
-
-function TsSpreadFormatRegistry.GetReaderClass(AFormatID: TsSpreadFormatID): TsSpreadReaderClass;
-var
- data: TsSpreadFormatData;
-begin
- data := FindFormatID(AFormatID);
- if data <> nil then
- Result := data.ReaderClass else
- Result := nil;
-end;
-
-function TsSpreadFormatRegistry.GetTechnicalName(AFormatID: TsSpreadFormatID): String;
-var
- data: TsSpreadFormatData;
-begin
- data := FindFormatID(AFormatID);
- if data <> nil then
- Result := data.TechnicalName else
- Result := '';
-end;
-
-function TsSpreadFormatRegistry.GetWriterClass(AFormatID: TsSpreadFormatID): TsSpreadWriterClass;
-var
- data: TsSpreadFormatData;
-begin
- data := FindFormatID(AFormatID);
- if data <> nil then
- Result := data.WriterClass else
- Result := nil;
-end;
-
-function TsSpreadFormatRegistry.IndexOf(AFormatID: TsSpreadFormatID): Integer;
-begin
- for Result := 0 to FList.Count - 1 do
- if TsSpreadFormatData(FList[Result]).FormatID = AFormatID then
- exit;
- Result := -1;
-end;
-
-
-{==============================================================================}
-{ Public utility functions }
-{==============================================================================}
-
-{@@ ----------------------------------------------------------------------------
- Registers a new reader/writer pair for a given spreadsheet file format
-
- AFormat identifies the file format, see sfXXXX declarations in built-in
- fpstypes.
-
- The system is open to user-defined formats. In this case, AFormat must have
- the value "sfUser". The format identifier is calculated as a negative number,
- stored in the TsSpreadFormatData class and returned as function result.
- This value is needed when calling fpspreadsheet's ReadFromXXXX and WriteToXXXX
- methods to specify the file format.
--------------------------------------------------------------------------------}
-function RegisterSpreadFormat(AFormat: TsSpreadsheetFormat;
- AReaderClass: TsSpreadReaderClass; AWriterClass: TsSpreadWriterClass;
- AFormatName, ATechnicalName: String; const AFileExtensions: array of String): TsSpreadFormatID;
-var
- fmt: TsSpreadFormatData;
- n: Integer;
-begin
- if AFormat <> sfUser then begin
- n := SpreadFormatRegistry.IndexOf(ord(AFormat));
- if n >= 0 then
- raise Exception.Create('[RegisterSpreadFormat] Spreadsheet format is already registered.');
- end;
-
- if Length(AFileExtensions) = 0 then
- raise Exception.Create('[RegisterSpreadFormat] File extensions needed for registering a file format.');
-
- if (AFormatName = '') or (ATechnicalName = '') then
- raise Exception.Create('[RegisterSpreadFormat] File format name is not specified.');
-
- fmt := TsSpreadFormatData.Create(ord(AFormat), AReaderClass, AWriterClass,
- AFormatName, ATechnicalName, AFileExtensions);
- n := SpreadFormatRegistry.Add(fmt);
- if (AFormat = sfUser) then
- begin
- if (n <= ord(sfUser)) then n := n + ord(sfUser) + 1;
- fmt.FFormatID := -n;
- end;
- Result := fmt.FormatID;
-end;
-
-function GetFileFormatFilter(AListSeparator, AExtSeparator: Char;
- AFileAccess: TsSpreadFileAccess; const APriorityFormats: array of TsSpreadFormatID;
- AllSpreadFormats: Boolean = false; AllExcelFormats: Boolean = false): String;
-begin
- Result := SpreadFormatRegistry.GetFileFilter(AListSeparator, AExtSeparator,
- AFileAccess, APriorityFormats, AllSpreadFormats, AllExcelFormats);
-end;
-
-function GetSpreadFormats(AFileAccess: TsSpreadFileAccess;
- const APriorityFormats: array of TsSpreadFormatID): TsSpreadFormatIDArray;
-begin
- Result := SpreadFormatRegistry.GetFormatArray(AFileAccess, APriorityFormats);
-end;
-
-function GetSpreadFormatsFromFileName(
- AFileAccess: TsSpreadFileAccess; AFileName: TFileName;
- APriorityFormat: TsSpreadFormatID = sfidUnknown): TsSpreadFormatIDArray;
-begin
- Result := SpreadFormatRegistry.GetFormatArrayFromFileName(
- AFileAccess, AFileName, APriorityFormat);
-end;
-
-function GetSpreadFormatExt(AFormatID: TsSpreadFormatID): String;
-begin
- Result := SpreadFormatRegistry.DefaultExt[AFormatID];
-end;
-
-function GetSpreadFormatName(AFormatID: TsSpreadFormatID): String;
-begin
- Result := SpreadFormatRegistry.FormatName[AFormatID];
-end;
-
-function GetSpreadTechnicalName(AFormatID: TsSpreadFormatID): String;
-begin
- Result := SpreadFormatRegistry.TechnicalName[AFormatID];
-end;
-
-function GetSpreadReaderClass(AFormatID: TsSpreadFormatID): TsSpreadReaderClass;
-begin
- Result := SpreadFormatRegistry.ReaderClass[AFormatID];
-end;
-
-function GetSpreadWriterClass(AFormatID: TsSpreadFormatID): TsSpreadWriterClass;
-begin
- Result := SpreadFormatRegistry.WriterClass[AFormatID];
-end;
-
-
-initialization
- SpreadFormatRegistry := TsSpreadFormatRegistry.Create;
-
-finalization
- SpreadFormatRegistry.Free;
-
-end.
-
diff --git a/components/fpspreadsheet/laz_fpspreadsheet.pas b/components/fpspreadsheet/laz_fpspreadsheet.pas
deleted file mode 100644
index 20fbdbd5d..000000000
--- a/components/fpspreadsheet/laz_fpspreadsheet.pas
+++ /dev/null
@@ -1,22 +0,0 @@
-{ This file was automatically created by Lazarus. Do not edit!
- This source is only used to compile and install the package.
- }
-
-unit laz_fpspreadsheet;
-
-interface
-
-uses
- fpolestorage, fpsallformats, xlscommon, fpsStreams, fpspreadsheet,
- fpsxmlcommon, xlsbiff2, xlsbiff5, xlsbiff8, xlsxooxml, fpsopendocument,
- fpsutils, fpszipper, uvirtuallayer_types, uvirtuallayer, uvirtuallayer_ole,
- uvirtuallayer_ole_helpers, uvirtuallayer_ole_types, uvirtuallayer_stream,
- fpolebasic, wikitable, fpsNumFormatParser, fpsfunc, fpsRPN, fpsStrings,
- fpscsv, fpsCsvDocument, fpspatches, fpsTypes, xlsEscher, fpsReaderWriter,
- fpsNumFormat, fpsclasses, fpsHeaderFooterParser, fpsPalette, fpsHTML,
- fpsHTMLUtils, fpsCell, fpsSearch, xlsxml, xlsconst, fpsCurrency,
- fpsRegFileFormats, fpsImages;
-
-implementation
-
-end.
diff --git a/components/fpspreadsheet/laz_fpspreadsheet_visual.pas b/components/fpspreadsheet/laz_fpspreadsheet_visual.pas
deleted file mode 100644
index 91d790a75..000000000
--- a/components/fpspreadsheet/laz_fpspreadsheet_visual.pas
+++ /dev/null
@@ -1,25 +0,0 @@
-{ This file was automatically created by Lazarus. Do not edit!
- This source is only used to compile and install the package.
- }
-
-unit laz_fpspreadsheet_visual;
-
-interface
-
-uses
- fpspreadsheetctrls, fpspreadsheetgrid, fpspreadsheetchart, fpsActions,
- fpsvisualutils, LazarusPackageIntf;
-
-implementation
-
-procedure Register;
-begin
- RegisterUnit('fpspreadsheetctrls', @fpspreadsheetctrls.Register);
- RegisterUnit('fpspreadsheetgrid', @fpspreadsheetgrid.Register);
- RegisterUnit('fpspreadsheetchart', @fpspreadsheetchart.Register);
- RegisterUnit('fpsActions', @fpsActions.Register);
-end;
-
-initialization
- RegisterPackage('laz_fpspreadsheet_visual', @Register);
-end.
diff --git a/components/fpspreadsheet/laz_fpspreadsheetexport_visual.pas b/components/fpspreadsheet/laz_fpspreadsheetexport_visual.pas
deleted file mode 100644
index b7455100c..000000000
--- a/components/fpspreadsheet/laz_fpspreadsheetexport_visual.pas
+++ /dev/null
@@ -1,22 +0,0 @@
-{ This file was automatically created by Lazarus. Do not edit!
- This source is only used to compile and install the package.
- }
-
-unit laz_fpspreadsheetexport_visual;
-
-{$warn 5023 off : no warning about unused units}
-interface
-
-uses
- fpsexport, fpsexportreg, LazarusPackageIntf;
-
-implementation
-
-procedure Register;
-begin
- RegisterUnit('fpsexportreg', @fpsexportreg.Register);
-end;
-
-initialization
- RegisterPackage('laz_fpspreadsheetexport_visual', @Register);
-end.
diff --git a/components/fpspreadsheet/readme.txt b/components/fpspreadsheet/readme.txt
deleted file mode 100644
index e2fadfbac..000000000
--- a/components/fpspreadsheet/readme.txt
+++ /dev/null
@@ -1,42 +0,0 @@
-fpspreadsheet
-=============
-The fpSpreadsheet library offers a convenient way to generate and read
-spreadsheet documents in various formats:
-- Excel 2.x .xls
-- Excel 5.0/Excel 95 .xls
-- Excel 8.0 (Excel 97-XP) .xls
-- Microsoft OOXML .xlsx
-- LibreOffice/OpenOffice OpenDocument .ods
-- wikimedia wikitable formats
-
-The library is written in a very flexible manner, capable of being extended to
-support any number of formats easily.
-
-Installation
-============
-If you only need non-GUI components: in Lazarus:
-- Package/Open Package File
-- select laz_fpspreadsheet.lpk
-- click Compile.
-Now the package is known to Lazarus (and should e.g. show up in Package/Package Links).
-Add it to your project like you add other packages.
-
-If you also want GUI components (grid and chart):
-- Package/Open Package File
-- seleect laz_fpspreadsheet_visual.lpk
-- click Compile
-- then click Use, Install and follow the prompts to rebuild Lazarus with the new package.
-Drop needed grid/chart components on your forms as usual
-
-License
-=======
-LGPL with static linking exception. This is the same license as is used in the Lazarus Component Library.
-
-More information
-================
-FPSpreadsheet documentation in fpspreadsheet.chm (open e.g. with Lazarus lhelp)
-
-The fpspreadsheet article on the Lazarus wiki with lots of example:
-http://wiki.lazarus.freepascal.org/FPSpreadsheet
-
-The demo programs in the examples folder
diff --git a/components/fpspreadsheet/fpolebasic.pas b/components/fpspreadsheet/source/common/fpolebasic.pas
similarity index 100%
rename from components/fpspreadsheet/fpolebasic.pas
rename to components/fpspreadsheet/source/common/fpolebasic.pas
diff --git a/components/fpspreadsheet/fpolestorage.pas b/components/fpspreadsheet/source/common/fpolestorage.pas
similarity index 100%
rename from components/fpspreadsheet/fpolestorage.pas
rename to components/fpspreadsheet/source/common/fpolestorage.pas
diff --git a/components/fpspreadsheet/fpsallformats.pas b/components/fpspreadsheet/source/common/fpsallformats.pas
old mode 100755
new mode 100644
similarity index 100%
rename from components/fpspreadsheet/fpsallformats.pas
rename to components/fpspreadsheet/source/common/fpsallformats.pas
diff --git a/components/fpspreadsheet/fpscell.pas b/components/fpspreadsheet/source/common/fpscell.pas
similarity index 100%
rename from components/fpspreadsheet/fpscell.pas
rename to components/fpspreadsheet/source/common/fpscell.pas
diff --git a/components/fpspreadsheet/fpsclasses.pas b/components/fpspreadsheet/source/common/fpsclasses.pas
similarity index 100%
rename from components/fpspreadsheet/fpsclasses.pas
rename to components/fpspreadsheet/source/common/fpsclasses.pas
diff --git a/components/fpspreadsheet/fpscsv.pas b/components/fpspreadsheet/source/common/fpscsv.pas
similarity index 99%
rename from components/fpspreadsheet/fpscsv.pas
rename to components/fpspreadsheet/source/common/fpscsv.pas
index c338ec5c0..d7c7b1ad8 100644
--- a/components/fpspreadsheet/fpscsv.pas
+++ b/components/fpspreadsheet/source/common/fpscsv.pas
@@ -93,7 +93,7 @@ implementation
uses
DateUtils, LConvEncoding, Math,
- fpsRegFileFormats, fpsUtils, fpsNumFormat;
+ fpsUtils, fpsNumFormat;
function LineEndingAsString(ALineEnding: TsCSVLineEnding): String;
begin
diff --git a/components/fpspreadsheet/fpscsvdocument.pas b/components/fpspreadsheet/source/common/fpscsvdocument.pas
similarity index 100%
rename from components/fpspreadsheet/fpscsvdocument.pas
rename to components/fpspreadsheet/source/common/fpscsvdocument.pas
diff --git a/components/fpspreadsheet/fpscurrency.pas b/components/fpspreadsheet/source/common/fpscurrency.pas
similarity index 100%
rename from components/fpspreadsheet/fpscurrency.pas
rename to components/fpspreadsheet/source/common/fpscurrency.pas
diff --git a/components/fpspreadsheet/fpsexprparser.pas b/components/fpspreadsheet/source/common/fpsexprparser.pas
similarity index 100%
rename from components/fpspreadsheet/fpsexprparser.pas
rename to components/fpspreadsheet/source/common/fpsexprparser.pas
diff --git a/components/fpspreadsheet/fpsfunc.pas b/components/fpspreadsheet/source/common/fpsfunc.pas
similarity index 100%
rename from components/fpspreadsheet/fpsfunc.pas
rename to components/fpspreadsheet/source/common/fpsfunc.pas
diff --git a/components/fpspreadsheet/fpsheaderfooterparser.pas b/components/fpspreadsheet/source/common/fpsheaderfooterparser.pas
similarity index 100%
rename from components/fpspreadsheet/fpsheaderfooterparser.pas
rename to components/fpspreadsheet/source/common/fpsheaderfooterparser.pas
diff --git a/components/fpspreadsheet/fpshtml.pas b/components/fpspreadsheet/source/common/fpshtml.pas
similarity index 99%
rename from components/fpspreadsheet/fpshtml.pas
rename to components/fpspreadsheet/source/common/fpshtml.pas
index 6b2f383ec..a104d3922 100644
--- a/components/fpspreadsheet/fpshtml.pas
+++ b/components/fpspreadsheet/source/common/fpshtml.pas
@@ -142,7 +142,7 @@ implementation
uses
LConvEncoding, LazUTF8, URIParser, StrUtils, Math,
- fpsRegFileFormats, fpsUtils, fpsXMLCommon, fpsNumFormat;
+ fpsUtils, fpsXMLCommon, fpsNumFormat;
const
MIN_FONTSIZE = 6;
diff --git a/components/fpspreadsheet/fpshtmlutils.pas b/components/fpspreadsheet/source/common/fpshtmlutils.pas
similarity index 99%
rename from components/fpspreadsheet/fpshtmlutils.pas
rename to components/fpspreadsheet/source/common/fpshtmlutils.pas
index a59b2c6da..3534c74fc 100644
--- a/components/fpspreadsheet/fpshtmlutils.pas
+++ b/components/fpspreadsheet/source/common/fpshtmlutils.pas
@@ -51,7 +51,7 @@ procedure RichTextToHTML(AWorkbook: TsWorkbook; AFont: TsFont;
implementation
uses
- math, lazUtf8, fasthtmlparser, //StrUtils, //Strings,
+ math, lazUtf8, fasthtmlparser,
fpsUtils, fpsClasses;
const
diff --git a/components/fpspreadsheet/fpsimages.pas b/components/fpspreadsheet/source/common/fpsimages.pas
similarity index 100%
rename from components/fpspreadsheet/fpsimages.pas
rename to components/fpspreadsheet/source/common/fpsimages.pas
diff --git a/components/fpspreadsheet/fpsnumformat.pas b/components/fpspreadsheet/source/common/fpsnumformat.pas
similarity index 68%
rename from components/fpspreadsheet/fpsnumformat.pas
rename to components/fpspreadsheet/source/common/fpsnumformat.pas
index c02c5051c..4e5aa02c0 100644
--- a/components/fpspreadsheet/fpsnumformat.pas
+++ b/components/fpspreadsheet/source/common/fpsnumformat.pas
@@ -19,6 +19,23 @@ uses
Classes, SysUtils,
fpstypes;
+const
+ psOK = 0;
+ psErrNoValidColorIndex = 1;
+ psErrNoValidCompareNumber = 2;
+ psErrUnknownInfoInBrackets = 3;
+ psErrConditionalFormattingNotSupported = 4;
+ psErrNoUsableFormat = 5;
+ psErrNoValidNumberFormat = 6;
+ psErrNoValidDateTimeFormat = 7;
+ psErrQuoteExpected = 8;
+ psErrMultipleCurrSymbols = 9;
+ psErrMultipleFracSymbols = 10;
+ psErrMultipleExpChars = 11;
+ psErrGeneralExpected = 12;
+ psAmbiguousSymbol = 13;
+ psErrNoValidTextFormat = 14;
+
type
{@@ Set of characters }
TsDecsChars = set of char;
@@ -189,6 +206,93 @@ type
end;
+ { TsNumFormatParser }
+
+ TsNumFormatParser = class
+ private
+ FToken: Char;
+ FCurrent: PChar;
+ FStart: PChar;
+ FEnd: PChar;
+ FCurrSection: Integer;
+ FStatus: Integer;
+ function GetCurrencySymbol: String;
+ function GetDecimals: byte;
+ function GetFracDenominator: Integer;
+ function GetFracInt: Integer;
+ function GetFracNumerator: Integer;
+ function GetFormatString: String;
+ function GetNumFormat: TsNumberFormat;
+ function GetParsedSectionCount: Integer;
+ function GetParsedSections(AIndex: Integer): TsNumFormatSection;
+ procedure SetDecimals(AValue: Byte);
+
+ protected
+ FFormatSettings: TFormatSettings;
+ FSections: TsNumFormatSections;
+
+ { Administration while scanning }
+ procedure AddElement(AToken: TsNumFormatToken; AText: String); overload;
+ procedure AddElement(AToken: TsNumFormatToken; AIntValue: Integer=0; AText: String = ''); overload;
+ procedure AddElement(AToken: TsNumFormatToken; AFloatValue: Double); overload;
+ procedure AddSection;
+ procedure DeleteElement(ASection, AIndex: Integer);
+ procedure InsertElement(ASection, AIndex: Integer; AToken: TsNumFormatToken; AText: String); overload;
+ procedure InsertElement(ASection, AIndex: Integer; AToken: TsNumFormatToken; AIntValue: Integer); overload;
+ procedure InsertElement(ASection, AIndex: Integer; AToken: TsNumFormatToken; AFloatValue: Double); overload;
+ function NextToken: Char;
+ function PrevToken: Char;
+
+ { Scanning/parsing }
+ procedure ScanAMPM;
+ procedure ScanAndCount(ATestChar: Char; out ACount: Integer);
+ procedure ScanBrackets;
+ procedure ScanCondition(AFirstChar: Char);
+ procedure ScanCurrSymbol;
+ procedure ScanDateTime;
+ procedure ScanFormat;
+ procedure ScanGeneral;
+ procedure ScanNumber;
+ procedure ScanQuotedText;
+ // Main scanner
+ procedure Parse(const AFormatString: String);
+
+ { Analysis while scanning }
+ procedure AnalyzeColor(AValue: String);
+ function AnalyzeCurrency(const AValue: String): Boolean;
+
+ { Analysis after scanning }
+ // General
+ procedure CheckSections;
+ procedure CheckSection(ASection: Integer);
+ procedure FixMonthMinuteToken(var ASection: TsNumFormatSection);
+ // Format string
+ function BuildFormatString: String; virtual;
+
+ public
+ constructor Create(const AFormatString: String;
+ const AFormatSettings: TFormatSettings);
+ destructor Destroy; override;
+ procedure ClearAll;
+ function GetDateTimeCode(ASection: Integer): String;
+ function IsDateTimeFormat: Boolean;
+ function IsTimeFormat: Boolean;
+ procedure LimitDecimals;
+
+ property CurrencySymbol: String read GetCurrencySymbol;
+ property Decimals: Byte read GetDecimals write SetDecimals;
+ property FormatString: String read GetFormatString;
+ property FracDenominator: Integer read GetFracDenominator;
+ property FracInt: Integer read GetFracInt;
+ property FracNumerator: Integer read GetFracNumerator;
+ property NumFormat: TsNumberFormat read GetNumFormat;
+ property ParsedSectionCount: Integer read GetParsedSectionCount;
+ property ParsedSections[AIndex: Integer]: TsNumFormatSection read GetParsedSections;
+ property Status: Integer read FStatus;
+ end;
+
+
+
{ Utility functions }
function AddAMPM(const ATimeFormatString: String;
@@ -256,11 +360,18 @@ procedure InitFormatSettings(out AFormatSettings: TFormatSettings);
procedure ReplaceFormatSettings(var AFormatSettings: TFormatSettings;
const ADefaultFormats: TFormatSettings);
+function CreateNumFormatParams(ANumFormatStr: String;
+ const AFormatSettings: TFormatSettings): TsNumFormatParams;
+
+function ParamsOfNumFormatStr(ANumFormatStr: String;
+ const AFormatSettings: TFormatSettings; var AResult: TsNumFormatParams): Integer;
+
+
implementation
uses
- StrUtils, Math,
- fpsUtils, fpsNumFormatParser, fpsCurrency;
+ StrUtils, Math, LazUTF8,
+ fpsUtils, fpsCurrency;
const
{@@ Array of format strings identifying the order of number and
@@ -2017,6 +2128,29 @@ begin
AFormatSettings.TwoDigitYearCenturyWindow := ADefaultFormats.TwoDigitYearCenturyWindow;
end;
+function CreateNumFormatParams(ANumFormatStr: String;
+ const AFormatSettings: TFormatSettings): TsNumFormatParams;
+begin
+ Result := TsNumFormatParams.Create;
+ ParamsOfNumFormatStr(ANumFormatStr, AFormatSettings, result);
+end;
+
+function ParamsOfNumFormatStr(ANumFormatStr: String;
+ const AFormatSettings: TFormatSettings; var AResult: TsNumFormatParams): Integer;
+var
+ parser: TsNumFormatParser;
+begin
+ Assert(AResult <> nil);
+ if ANumFormatstr = 'General' then ANumFormatStr := '';
+ parser := TsNumFormatParser.Create(ANumFormatStr, AFormatSettings);
+ try
+ Result := parser.Status;
+ AResult.Sections := parser.FSections;
+ finally
+ parser.Free;
+ end;
+end;
+
{==============================================================================}
{ TsNumFormatParams }
@@ -2514,4 +2648,1365 @@ begin
end;
+{==============================================================================}
+{ TsNumFormatParser }
+{==============================================================================}
+
+{@@ ----------------------------------------------------------------------------
+ Creates a number format parser for analyzing a formatstring that has been
+ read from a spreadsheet file.
+
+ If ALocalized is true then the formatstring contains localized decimal
+ separator etc.
+-------------------------------------------------------------------------------}
+constructor TsNumFormatParser.Create(const AFormatString: String;
+ const AFormatSettings: TFormatSettings);
+begin
+ inherited Create;
+ FFormatSettings := AFormatSettings;
+ Parse(AFormatString);
+ CheckSections;
+ if AFormatString = '' then FSections[0].NumFormat := nfGeneral;
+end;
+
+destructor TsNumFormatParser.Destroy;
+begin
+ FSections := nil;
+ inherited Destroy;
+end;
+
+procedure TsNumFormatParser.AddElement(AToken: TsNumFormatToken; AText: String);
+var
+ n: Integer;
+begin
+ n := Length(FSections[FCurrSection].Elements);
+ SetLength(FSections[FCurrSection].Elements, n+1);
+ FSections[FCurrSection].Elements[n].Token := AToken;
+ FSections[FCurrSection].Elements[n].TextValue := AText;
+end;
+
+procedure TsNumFormatParser.AddElement(AToken: TsNumFormatToken;
+ AIntValue: Integer=0; AText: String = '');
+var
+ n: Integer;
+begin
+ n := Length(FSections[FCurrSection].Elements);
+ SetLength(FSections[FCurrSection].Elements, n+1);
+ FSections[FCurrSection].Elements[n].Token := AToken;
+ FSections[FCurrSection].Elements[n].IntValue := AIntValue;
+ FSections[FCurrSection].Elements[n].TextValue := AText;
+end;
+
+procedure TsNumFormatParser.AddElement(AToken: TsNumFormatToken; AFloatValue: Double); overload;
+var
+ n: Integer;
+begin
+ n := Length(FSections[FCurrSection].Elements);
+ SetLength(FSections[FCurrSection].Elements, n+1);
+ FSections[FCurrSection].Elements[n].Token := AToken;
+ FSections[FCurrSection].Elements[n].FloatValue := AFloatValue;
+end;
+
+procedure TsNumFormatParser.AddSection;
+begin
+ FCurrSection := Length(FSections);
+ SetLength(FSections, FCurrSection + 1);
+ with FSections[FCurrSection] do
+ SetLength(Elements, 0);
+end;
+
+procedure TsNumFormatParser.AnalyzeColor(AValue: String);
+var
+ n: Integer;
+begin
+ AValue := lowercase(AValue);
+ // Colors
+ if AValue = 'red' then
+ AddElement(nftColor, ord(scRed))
+ else
+ if AValue = 'black' then
+ AddElement(nftColor, ord(scBlack))
+ else
+ if AValue = 'blue' then
+ AddElement(nftColor, ord(scBlue))
+ else
+ if AValue = 'white' then
+ AddElement(nftColor, ord(scWhite))
+ else
+ if AValue = 'green' then
+ AddElement(nftColor, ord(scGreen))
+ else
+ if AValue = 'cyan' then
+ AddElement(nftColor, ord(scCyan))
+ else
+ if AValue = 'magenta' then
+ AddElement(nftColor, ord(scMagenta))
+ else
+ if copy(AValue, 1, 5) = 'color' then begin
+ AValue := copy(AValue, 6, Length(AValue));
+ if not TryStrToInt(trim(AValue), n) then begin
+ FStatus := psErrNoValidColorIndex;
+ exit;
+ end;
+ AddElement(nftColor, n);
+ end else
+ FStatus := psErrUnknownInfoInBrackets;
+end;
+
+function TsNumFormatParser.AnalyzeCurrency(const AValue: String): Boolean;
+begin
+ if (FFormatSettings.CurrencyString = '') then
+ Result := false
+ else
+ Result := CurrencyRegistered(AValue);
+end;
+
+{ Creates a formatstring for all sections.
+ Note: this implementation is only valid for the fpc and Excel dialects of
+ format string. }
+function TsNumFormatParser.BuildFormatString: String;
+var
+ i: Integer;
+begin
+ if Length(FSections) > 0 then begin
+ Result := BuildFormatStringFromSection(FSections[0]);
+ for i:=1 to High(FSections) do
+ Result := Result + ';' + BuildFormatStringFromSection(FSections[i]);
+ end;
+end;
+
+procedure TsNumFormatParser.CheckSections;
+var
+ i: Integer;
+begin
+ for i:=0 to High(FSections) do
+ CheckSection(i);
+
+ if (Length(FSections) > 1) and (FSections[1].NumFormat = nfCurrencyRed) then
+ for i:=0 to High(FSections) do
+ if FSections[i].NumFormat = nfCurrency then
+ FSections[i].NumFormat := nfCurrencyRed;
+end;
+
+procedure TsNumFormatParser.CheckSection(ASection: Integer);
+var
+ el, i: Integer;
+ section: PsNumFormatSection;
+ nfs, nfsTest: String;
+ nf: TsNumberFormat;
+ formats: set of TsNumberFormat;
+ isMonthMinute: Boolean;
+begin
+ if FStatus <> psOK then
+ exit;
+
+ section := @FSections[ASection];
+ section^.Kind := [];
+
+ if (ASection = 0) and (Length(FSections) = 1) and (Length(section^.Elements) = 1)
+ and (section^.Elements[0].Token = nftGeneral)
+ then begin
+ section^.NumFormat := nfGeneral;
+ exit;
+ end;
+
+ i := 0;
+ isMonthMinute := false;
+
+ for el := 0 to High(section^.Elements) do
+ begin
+ case section^.Elements[el].Token of
+ nftZeroDecs:
+ section^.Decimals := section^.Elements[el].IntValue;
+ nftIntZeroDigit, nftIntOptDigit, nftIntSpaceDigit:
+ i := section^.Elements[el].IntValue;
+ nftFracNumSpaceDigit, nftFracNumZeroDigit:
+ section^.FracNumerator := section^.Elements[el].IntValue;
+ nftFracDenomSpaceDigit, nftFracDenomZeroDigit:
+ section^.FracDenominator := section^.Elements[el].IntValue;
+ nftFracDenom:
+ section^.FracDenominator := -section^.Elements[el].IntValue;
+ nftPercent:
+ section^.Kind := section^.Kind + [nfkPercent];
+ nftExpChar:
+ if (nfkExp in section^.Kind) then
+ FStatus := psErrMultipleExpChars
+ else
+ section^.Kind := section^.Kind + [nfkExp];
+ nftFactor:
+ if section^.Elements[el].IntValue <> 0 then
+ begin
+ section^.Elements[el].FloatValue := IntPower(10, -3*section^.Elements[el].IntValue);
+ section^.Factor := section^.Elements[el].FloatValue;
+ section^.Kind := section^.Kind + [nfkHasFactor];
+ end;
+ nftFracSymbol:
+ if (nfkFraction in section^.Kind) then
+ FStatus := psErrMultipleFracSymbols
+ else
+ begin
+ section^.Kind := section^.Kind + [nfkFraction];
+ section^.FracInt := i;
+ end;
+ nftCurrSymbol:
+ begin
+ if (nfkCurrency in section^.Kind) then
+ FStatus := psErrMultipleCurrSymbols
+ else begin
+ section^.Kind := section^.Kind + [nfkCurrency];
+ section^.CurrencySymbol := section^.Elements[el].TextValue;
+ end;
+ end;
+ nftYear, nftMonth, nftDay:
+ section^.Kind := section^.Kind + [nfkDate];
+ nftHour, nftMinute, nftSecond, nftMilliseconds:
+ begin
+ section^.Kind := section^.Kind + [nfkTime];
+ if section^.Elements[el].IntValue < 0 then
+ section^.Kind := section^.Kind + [nfkTimeInterval];
+ end;
+ nftMonthMinute:
+ isMonthMinute := true;
+ nftColor:
+ begin
+ section^.Kind := section^.Kind + [nfkHasColor];
+ section^.Color := section^.Elements[el].IntValue;
+ end;
+ nftIntTh:
+ section^.Kind := section^.Kind + [nfkHasThSep];
+ nftTextFormat:
+ section^.Kind := section^.Kind + [nfkText];
+ end;
+ end; // for
+
+ if FStatus <> psOK then
+ exit;
+
+ if (section^.Kind * [nfkDate, nfkTime] <> []) and
+ (section^.Kind * [nfkPercent, nfkExp, nfkCurrency, nfkFraction] <> []) then
+ begin
+ FStatus := psErrNoValidDateTimeFormat;
+ exit;
+ end;
+
+ if (Length(FSections) = 1) and (section^.Kind = [nfkText]) then begin
+ section^.NumFormat := nfText;
+ exit;
+ end;
+
+ section^.NumFormat := nfCustom;
+
+ if (section^.Kind * [nfkDate, nfkTime] <> []) or isMonthMinute then
+ begin
+ FixMonthMinuteToken(section^);
+ nfs := GetFormatString;
+ if (nfkTimeInterval in section^.Kind) then
+ section^.NumFormat := nfTimeInterval
+ else
+ begin
+ formats := [nfShortDateTime, nfLongDate, nfShortDate, nfLongTime,
+ nfShortTime, nfLongTimeAM, nfShortTimeAM, nfDayMonth, nfMonthYear];
+ for nf in formats do
+ begin
+ nfsTest := BuildDateTimeFormatString(nf, FFormatSettings);
+ if Length(nfsTest) = Length(nfs) then
+ begin
+ if SameText(nfs, nfsTest) then
+ begin
+ section^.NumFormat := nf;
+ break;
+ end;
+ for i := 1 to Length(nfsTest) do
+ case nfsTest[i] of
+ '/': if not (nf in [nfLongTimeAM, nfShortTimeAM]) then
+ nfsTest[i] := FFormatSettings.DateSeparator;
+ ':': nfsTest[i] := FFormatSettings.TimeSeparator;
+ 'n': nfsTest[i] := 'm';
+ end;
+ if SameText(nfs, nfsTest) then
+ begin
+ section^.NumFormat := nf;
+ break;
+ end;
+ end;
+ end;
+ end;
+ end else
+ begin
+ nfs := GetFormatString;
+ nfsTest := BuildFractionFormatString(section^.FracInt > 0, section^.FracNumerator, section^.FracDenominator);
+ if sameText(nfs, nfsTest) then
+ section^.NumFormat := nfFraction
+ else
+ begin
+ formats := [nfFixed, nfFixedTh, nfPercentage, nfExp];
+ for nf in formats do begin
+ nfsTest := BuildNumberFormatString(nf, FFormatSettings, section^.Decimals);
+ if SameText(nfs, nfsTest) then
+ begin
+ section^.NumFormat := nf;
+ break;
+ end;
+ end;
+ end;
+ if (section^.NumFormat = nfCustom) and (nfkCurrency in section^.Kind) then
+ begin
+ section^.NumFormat := nfCurrency;
+ if section^.Color = scRed then
+ section^.NumFormat := nfCurrencyRed;
+ end;
+ end;
+end;
+
+procedure TsNumFormatParser.ClearAll;
+var
+ i, j: Integer;
+begin
+ for i:=0 to Length(FSections)-1 do begin
+ for j:=0 to Length(FSections[i].Elements) do
+ if FSections[i].Elements <> nil then
+ FSections[i].Elements[j].TextValue := '';
+ FSections[i].Elements := nil;
+ FSections[i].CurrencySymbol := '';
+ end;
+ FSections := nil;
+end;
+
+procedure TsNumFormatParser.DeleteElement(ASection, AIndex: Integer);
+var
+ i, n: Integer;
+begin
+ n := Length(FSections[ASection].Elements);
+ for i:= AIndex+1 to n-1 do
+ FSections[ASection].Elements[i-1] := FSections[ASection].Elements[i];
+ SetLength(FSections[ASection].Elements, n-1);
+end;
+
+{ Identify the ambiguous "m" token ("month" or "minute") }
+procedure TsNumFormatParser.FixMonthMinuteToken(var ASection: TsNumFormatSection);
+var
+ i, j: Integer;
+
+ // Finds the previous date/time element skipping spaces, date/time sep etc.
+ function PrevDateTimeElement(j: Integer): Integer;
+ begin
+ Result := -1;
+ dec(j);
+ while (j >= 0) do begin
+ with ASection.Elements[j] do
+ if Token in [nftYear, nftMonth, nftDay, nftHour, nftMinute, nftSecond] then
+ begin
+ Result := j;
+ exit;
+ end;
+ dec(j);
+ end;
+ end;
+
+ // Finds the next date/time element skipping spaces, date/time sep etc.
+ function NextDateTimeElement(j: Integer): Integer;
+ begin
+ Result := -1;
+ inc(j);
+ while (j < Length(ASection.Elements)) do begin
+ with ASection.Elements[j] do
+ if Token in [nftYear, nftMonth, nftDay, nftHour, nftMinute, nftSecond] then
+ begin
+ Result := j;
+ exit;
+ end;
+ inc(j);
+ end;
+ end;
+
+begin
+ for i:=0 to High(ASection.Elements) do
+ begin
+ // Find index of nftMonthMinute token...
+ if ASection.Elements[i].Token = nftMonthMinute then begin
+ // ... and, using its neighbors, decide whether it is a month or a minute.
+ j := NextDateTimeElement(i);
+ if j <> -1 then
+ case ASection.Elements[j].Token of
+ nftDay, nftYear:
+ begin
+ ASection.Elements[i].Token := nftMonth;
+ Continue;
+ end;
+ nftSecond:
+ begin
+ ASection.Elements[i].Token := nftMinute;
+ Continue;
+ end;
+ end;
+ j := PrevDateTimeElement(i);
+ if j <> -1 then
+ case ASection.Elements[j].Token of
+ nftDay, nftYear:
+ begin
+ ASection.Elements[i].Token := nftMonth;
+ Continue;
+ end;
+ nftHour:
+ begin
+ ASection.Elements[i].Token := nftMinute;
+ Continue;
+ end;
+ end;
+
+ // If we get here the token is isolated. In this case we assume
+ // that it is a month - that's the way Excel does it when reading files
+ // (for editing of a worksheet, however, Excel distinguishes between
+ // uppercase "M" for "month" and lowercase "m" for "minute".)
+ ASection.Elements[i].Token := nftMonth;
+ Include(ASection.Kind, nfkDate);
+ end;
+ end;
+end;
+
+procedure TsNumFormatParser.InsertElement(ASection, AIndex: Integer;
+ AToken: TsNumFormatToken; AText: String);
+var
+ i, n: Integer;
+begin
+ n := Length(FSections[ASection].Elements);
+ SetLength(FSections[ASection].Elements, n+1);
+ for i:= n-1 downto AIndex+1 do
+ FSections[ASection].Elements[i+1] := FSections[ASection].Elements[i];
+ FSections[ASection].Elements[AIndex+1].Token := AToken;
+ FSections[ASection].Elements[AIndex+1].TextValue := AText;
+end;
+
+procedure TsNumFormatParser.InsertElement(ASection, AIndex: Integer;
+ AToken: TsNumFormatToken; AIntValue: Integer);
+var
+ i, n: Integer;
+begin
+ n := Length(FSections[ASection].Elements);
+ SetLength(FSections[ASection].Elements, n+1);
+ for i:= n-1 downto AIndex+1 do
+ FSections[ASection].Elements[i+1] := FSections[ASection].Elements[i];
+ FSections[ASection].Elements[AIndex+1].Token := AToken;
+ FSections[ASection].Elements[AIndex+1].IntValue := AIntValue;
+end;
+
+procedure TsNumFormatParser.InsertElement(ASection, AIndex: Integer;
+ AToken: TsNumFormatToken; AFloatValue: Double);
+var
+ i, n: Integer;
+begin
+ n := Length(FSections[ASection].Elements);
+ SetLength(FSections[ASection].Elements, n+1);
+ for i:= n-1 downto AIndex+1 do
+ FSections[ASection].Elements[i+1] := FSections[ASection].Elements[i];
+ FSections[ASection].Elements[AIndex+1].Token := AToken;
+ FSections[ASection].Elements[AIndex+1].FloatValue := AFloatValue;
+end;
+
+function TsNumFormatParser.GetFormatString: String;
+begin
+ Result := BuildFormatString;
+end;
+
+{ Extracts the currency symbol form the formatting sections. It is assumed that
+ all two or three sections of the currency/accounting format use the same
+ currency symbol, otherwise it would be custom format anyway which ignores
+ the currencysymbol value. }
+function TsNumFormatParser.GetCurrencySymbol: String;
+begin
+ if Length(FSections) > 0 then
+ Result := FSections[0].CurrencySymbol
+ else
+ Result := '';
+end;
+
+{ Creates a string which summarizes the date/time formats in the given section.
+ The string contains a 'y' for a nftYear, a 'm' for a nftMonth, a
+ 'd' for a nftDay, a 'h' for a nftHour, a 'n' for a nftMinute, a 's' for a
+ nftSeconds, and a 'z' for a nftMilliseconds token. The order is retained.
+ Needed for biff2 }
+function TsNumFormatParser.GetDateTimeCode(ASection: Integer): String;
+var
+ i: Integer;
+begin
+ Result := '';
+ if ASection < Length(FSections) then
+ with FSections[ASection] do begin
+ i := 0;
+ while i < Length(Elements) do begin
+ case Elements[i].Token of
+ nftYear : Result := Result + 'y';
+ nftMonth : Result := Result + 'm';
+ nftDay : Result := Result + 'd';
+ nftHour : Result := Result + 'h';
+ nftMinute : Result := Result + 'n';
+ nftSecond : Result := Result + 's';
+ nftMilliSeconds: Result := Result + 'z';
+ end;
+ inc(i);
+ end;
+ end;
+end;
+
+{ Extracts the number of decimals from the sections. Since they are needed only
+ for default formats having only a single section, only the first section is
+ considered. In case of currency/accounting having two or three sections, it is
+ assumed that all sections have the same decimals count, otherwise it would not
+ be a standard format. }
+function TsNumFormatParser.GetDecimals: Byte;
+begin
+ if Length(FSections) > 0 then
+ Result := FSections[0].Decimals
+ else
+ Result := 0;
+end;
+
+function TsNumFormatParser.GetFracDenominator: Integer;
+begin
+ if Length(FSections) > 0 then
+ Result := FSections[0].FracDenominator
+ else
+ Result := 0;
+end;
+
+function TsNumFormatParser.GetFracInt: Integer;
+begin
+ if Length(FSections) > 0 then
+ Result := FSections[0].FracInt
+ else
+ Result := 0;
+end;
+
+function TsNumFormatParser.GetFracNumerator: Integer;
+begin
+ if Length(FSections) > 0 then
+ Result := FSections[0].FracNumerator
+ else
+ Result := 0;
+end;
+
+{ Tries to extract a common builtin number format from the sections. If there
+ are multiple sections, it is always a custom format, except for Currency and
+ Accounting. }
+function TsNumFormatParser.GetNumFormat: TsNumberFormat;
+begin
+ if Length(FSections) = 0 then
+ result := nfGeneral
+ else begin
+ Result := FSections[0].NumFormat;
+ if (Result = nfCurrency) then begin
+ if Length(FSections) = 2 then begin
+ Result := FSections[1].NumFormat;
+ if FSections[1].CurrencySymbol <> FSections[0].CurrencySymbol then begin
+ Result := nfCustom;
+ exit;
+ end;
+ if (FSections[0].NumFormat in [nfCurrency, nfCurrencyRed]) and
+ (FSections[1].NumFormat in [nfCurrency, nfCurrencyRed])
+ then
+ exit;
+ end else
+ if Length(FSections) = 3 then begin
+ Result := FSections[1].NumFormat;
+ if (FSections[0].CurrencySymbol <> FSections[1].CurrencySymbol) or
+ (FSections[1].CurrencySymbol <> FSections[2].CurrencySymbol)
+ then begin
+ Result := nfCustom;
+ exit;
+ end;
+ if (FSections[0].NumFormat in [nfCurrency, nfCurrencyRed]) and
+ (FSections[1].NumFormat in [nfCurrency, nfCurrencyRed]) and
+ (FSections[2].NumFormat in [nfCurrency, nfCurrencyRed])
+ then
+ exit;
+ end;
+ Result := nfCustom;
+ exit;
+ end;
+ if Length(FSections) > 1 then
+ Result := nfCustom;
+ end;
+end;
+
+function TsNumFormatParser.GetParsedSectionCount: Integer;
+begin
+ Result := Length(FSections);
+end;
+
+function TsNumFormatParser.GetParsedSections(AIndex: Integer): TsNumFormatSection;
+begin
+ Result := FSections[AIndex];
+end;
+ {
+function TsNumFormatParser.GetTokenIntValueAt(AToken: TsNumFormatToken;
+ ASection, AIndex: Integer): Integer;
+begin
+ if IsTokenAt(AToken, ASection, AIndex) then
+ Result := FSections[ASection].Elements[AIndex].IntValue
+ else
+ Result := -1;
+end;
+ }
+{ Returns true if the format elements contain at least one date/time token }
+function TsNumFormatParser.IsDateTimeFormat: Boolean;
+var
+ section: TsNumFormatSection;
+begin
+ for section in FSections do
+ if section.Kind * [nfkDate, nfkTime] <> [] then
+ begin
+ Result := true;
+ exit;
+ end;
+ Result := false;
+end;
+ {
+function TsNumFormatParser.IsNumberAt(ASection, AIndex: Integer;
+ out ANumFormat: TsNumberFormat; out ADecimals: Byte;
+ out ANextIndex: Integer): Boolean;
+var
+ token: TsNumFormatToken;
+begin
+ if (ASection > High(FSections)) or (AIndex > High(FSections[ASection].Elements))
+ then begin
+ Result := false;
+ ANextIndex := AIndex;
+ exit;
+ end;
+
+ Result := true;
+ ANumFormat := nfCustom;
+ ADecimals := 0;
+ token := FSections[ASection].Elements[AIndex].Token;
+
+ if token in [nftFracNumOptDigit, nftFracNumZeroDigit, nftFracNumSpaceDigit,
+ nftFracDenomOptDigit, nftFracDenomZeroDigit, nftFracDenomSpaceDigit] then
+ begin
+ ANumFormat := nfFraction;
+ ANextIndex := AIndex + 1;
+ exit;
+ end;
+
+ if (token = nftIntTh) and (FSections[ASection].Elements[AIndex].IntValue = 1) then // '#,##0'
+ ANumFormat := nfFixedTh
+ else
+ if (token = nftIntZeroDigit) and (FSections[ASection].Elements[AIndex].IntValue = 1) then // '0'
+ ANumFormat := nfFixed;
+
+ if (token in [nftIntTh, nftIntZeroDigit, nftIntOptDigit, nftIntSpaceDigit]) then
+ begin
+ if IsTokenAt(nftDecSep, ASection, AIndex+1) then
+ begin
+ if AIndex + 2 < Length(FSections[ASection].Elements) then
+ begin
+ token := FSections[ASection].Elements[AIndex+2].Token;
+ if (token in [nftZeroDecs, nftOptDecs, nftSpaceDecs]) then
+ begin
+ ANextIndex := AIndex + 3;
+ ADecimals := FSections[ASection].Elements[AIndex+2].IntValue;
+ if (token <> nftZeroDecs) then
+ ANumFormat := nfCustom;
+ exit;
+ end;
+ end;
+ end else
+ if IsTokenAt(nftSpace, ASection, AIndex+1) then
+ begin
+ ANumFormat := nfFraction;
+ ANextIndex := AIndex + 1;
+ exit;
+ end else
+ begin
+ ANextIndex := AIndex + 1;
+ exit;
+ end;
+ end;
+
+ ANextIndex := AIndex;
+ Result := false;
+end;
+
+function TsNumFormatParser.IsTextAt(AText: String; ASection, AIndex: Integer): Boolean;
+begin
+ Result := IsTokenAt(nftText, ASection, AIndex) and
+ (FSections[ASection].Elements[AIndex].TextValue = AText);
+end;
+ }
+{ Returns true if the format elements contain only time, no date tokens. }
+function TsNumFormatParser.IsTimeFormat: Boolean;
+var
+ section: TsNumFormatSection;
+begin
+ for section in FSections do
+ if (nfkTime in section.Kind) then
+ begin
+ Result := true;
+ exit;
+ end;
+ Result := false;
+end;
+ {
+function TsNumFormatParser.IsTokenAt(AToken: TsNumFormatToken;
+ ASection, AIndex: Integer): Boolean;
+begin
+ Result := (ASection < Length(FSections)) and
+ (AIndex < Length(FSections[ASection].Elements)) and
+ (FSections[ASection].Elements[AIndex].Token = AToken);
+end;
+ }
+{ Limits the decimals to 0 or 2, as required by Excel2. }
+procedure TsNumFormatParser.LimitDecimals;
+var
+ i, j: Integer;
+begin
+ for j:=0 to High(FSections) do
+ for i:=0 to High(FSections[j].Elements) do
+ if FSections[j].Elements[i].Token = nftZeroDecs then
+ if FSections[j].Elements[i].IntValue > 0 then
+ FSections[j].Elements[i].IntValue := 2;
+end;
+
+function TsNumFormatParser.NextToken: Char;
+begin
+ if FCurrent < FEnd then begin
+ inc(FCurrent);
+ Result := FCurrent^;
+ end else
+ Result := #0;
+end;
+
+function TsNumFormatParser.PrevToken: Char;
+begin
+ if FCurrent > nil then begin
+ dec(FCurrent);
+ Result := FCurrent^;
+ end else
+ Result := #0;
+end;
+
+procedure TsNumFormatParser.Parse(const AFormatString: String);
+begin
+ FStatus := psOK;
+
+ AddSection;
+ if (AFormatString = '') then
+ begin
+ AddElement(nftGeneral);
+ exit;
+ end;
+
+ FStart := @AFormatString[1];
+ FEnd := FStart + Length(AFormatString);
+ FCurrent := FStart;
+ FToken := FCurrent^;
+ while (FCurrent < FEnd) and (FStatus = psOK) do begin
+ case FToken of
+ 'G','g': ScanGeneral;
+ '[': ScanBrackets;
+ '"': ScanQuotedText;
+ ':': AddElement(nftDateTimeSep, ':');
+ ';': AddSection;
+ else ScanFormat;
+ end;
+ FToken := NextToken;
+ end;
+end;
+
+{ Scans an AM/PM sequence (or AMPM or A/P).
+ At exit, cursor is a next character }
+procedure TsNumFormatParser.ScanAMPM;
+var
+ s: String;
+ el: Integer;
+begin
+ s := '';
+ while (FCurrent < FEnd) do begin
+ if (FToken in ['A', 'a', 'P', 'p', 'm', 'M', '/']) then
+ s := s + FToken
+ else
+ break;
+ FToken := NextToken;
+ end;
+ if s <> '' then
+ begin
+ AddElement(nftAMPM, s);
+ // Tag the hour element for AM/PM format needed
+ el := High(FSections[FCurrSection].Elements)-1;
+ for el := High(FSections[FCurrSection].Elements)-1 downto 0 do
+ if FSections[FCurrSection].Elements[el].Token = nftHour then
+ begin
+ FSections[FCurrSection].Elements[el].TextValue := 'AM';
+ break;
+ end;
+ end;
+end;
+
+{ Counts the number of characters equal to ATestChar. Stops at the next
+ different character. This is also where the cursor is at exit. }
+procedure TsNumFormatParser.ScanAndCount(ATestChar: Char; out ACount: Integer);
+begin
+ ACount := 0;
+ if FToken <> ATestChar then
+ exit;
+ repeat
+ inc(ACount);
+ FToken := NextToken;
+ until (FToken <> ATestChar) or (FCurrent >= FEnd);
+end;
+
+{ Extracts the text between square brackets. This can be
+ - a time duration like [hh]
+ - a condition, like [>= 2.0]
+ - a currency symbol like [$€-409]
+ - a color like [red] or [color25]
+ The procedure is left with the cursor at ']' }
+procedure TsNumFormatParser.ScanBrackets;
+var
+ s: String;
+ n: Integer;
+ prevtok: Char;
+ isText: Boolean;
+begin
+ s := '';
+ isText := false;
+ FToken := NextToken; // Cursor was at '['
+ while (FCurrent < FEnd) and (FStatus = psOK) do begin
+ case FToken of
+ 'h', 'H', 'm', 'M', 'n', 'N', 's', 'S':
+ if isText then
+ s := s + FToken
+ else
+ begin
+ prevtok := FToken;
+ ScanAndCount(FToken, n);
+ if (FToken in [']', #0]) then begin
+ case prevtok of
+ 'h', 'H' : AddElement(nftHour, -n);
+ 'm', 'M', 'n', 'N': AddElement(nftMinute, -n);
+ 's', 'S' : AddElement(nftSecond, -n);
+ end;
+ break;
+ end else
+ FStatus := psErrUnknownInfoInBrackets;
+ end;
+
+ '<', '>', '=':
+ begin
+ ScanCondition(FToken);
+ if FToken = ']' then
+ break
+ else
+ FStatus := psErrUnknownInfoInBrackets;
+ end;
+
+ '$':
+ begin
+ ScanCurrSymbol;
+ if FToken = ']' then
+ break
+ else
+ FStatus := psErrUnknownInfoInBrackets;
+ end;
+
+ ']':
+ begin
+ AnalyzeColor(s);
+ break;
+ end;
+
+ else
+ s := s + FToken;
+ isText := true;
+ end;
+ FToken := NextToken;
+ end;
+end;
+
+{ Scans a condition like [>=2.0]. Starts after the "[" and ends before at "]".
+ Returns first character after the number (spaces allowed). }
+procedure TsNumFormatParser.ScanCondition(AFirstChar: Char);
+var
+ s: String;
+// op: TsCompareOperation;
+ value: Double;
+ res: Integer;
+begin
+ s := AFirstChar;
+ FToken := NextToken;
+ if FToken in ['>', '<', '='] then s := s + FToken else FToken := PrevToken;
+ {
+ if s = '=' then op := coEqual else
+ if s = '<>' then op := coNotEqual else
+ if s = '<' then op := coLess else
+ if s = '>' then op := coGreater else
+ if s = '<=' then op := coLessEqual else
+ if s = '>=' then op := coGreaterEqual
+ else begin
+ FStatus := psErrUnknownInfoInBrackets;
+ FToken := #0;
+ exit;
+ end;
+ }
+ while (FToken = ' ') and (FCurrent < FEnd) do
+ FToken := NextToken;
+
+ if FCurrent >= FEnd then begin
+ FStatus := psErrUnknownInfoInBrackets;
+ FToken := #0;
+ exit;
+ end;
+
+ s := FToken;
+ while (FCurrent < FEnd) and (FToken in ['+', '-', '.', '0'..'9']) do begin
+ FToken := NextToken;
+ s := s + FToken;
+ end;
+ val(s, value, res);
+ if res <> 0 then begin
+ FStatus := psErrUnknownInfoInBrackets;
+ FToken := #0;
+ exit;
+ end;
+
+ while (FCurrent < FEnd) and (FToken = ' ') do
+ FToken := NextToken;
+ if FToken = ']' then
+ AddElement(nftCompareOp, value)
+ else begin
+ FStatus := psErrUnknownInfoInBrackets;
+ FToken := #0;
+ end;
+end;
+
+{ Scans to end of a symbol like [$EUR-409], starting after the $ and ending at
+ the "]".
+ After the "$" follows the currency symbol, after the "-" country information }
+procedure TsNumFormatParser.ScanCurrSymbol;
+var
+ s: String;
+begin
+ s := '';
+ FToken := NextToken;
+ while (FCurrent < FEnd) and not (FToken in ['-', ']']) do begin
+ s := s + FToken;
+ FToken := NextToken;
+ end;
+ if s <> '' then
+ AddElement(nftCurrSymbol, s);
+ if FToken <> ']' then begin
+ FToken := NextToken;
+ while (FCurrent < FEnd) and (FToken <> ']') do begin
+ s := s + FToken;
+ FToken := NextToken;
+ end;
+ if s <> '' then
+ AddElement(nftCountry, s);
+ end;
+end;
+
+{ Scans a date/time format. Procedure is left with the cursor at the last char
+ of the date/time format. }
+procedure TsNumFormatParser.ScanDateTime;
+var
+ n: Integer;
+ token: Char;
+begin
+ while (FCurrent < FEnd) and (FStatus = psOK) do begin
+ case FToken of
+ '\': // means that the next character is taken literally
+ begin
+ FToken := NextToken; // skip the "\"...
+ AddElement(nftEscaped, FToken);
+ FToken := NextToken;
+ end;
+ 'Y', 'y':
+ begin
+ ScanAndCount(FToken, n);
+ AddElement(nftYear, n);
+ end;
+ 'm', 'M', 'n', 'N':
+ begin
+ token := FToken;
+ ScanAndCount(FToken, n);
+ AddElement(nftMonthMinute, n, token); // Decide on minute or month later
+ end;
+ 'D', 'd':
+ begin
+ ScanAndCount(FToken, n);
+ AddElement(nftDay, n);
+ end;
+ 'H', 'h':
+ begin
+ ScanAndCount(FToken, n);
+ AddElement(nftHour, n);
+ end;
+ 'S', 's':
+ begin
+ ScanAndCount(FToken, n);
+ AddElement(nftSecond, n);
+ end;
+ '/', ':':
+ begin
+ AddElement(nftDateTimeSep, FToken);
+ FToken := NextToken;
+ end;
+ '.':
+ begin
+ token := NextToken;
+ if token in ['z', '0'] then begin
+ AddElement(nftDecSep, FToken);
+ FToken := NextToken;
+ ScanAndCount(FToken, n);
+ AddElement(nftMilliseconds, n);
+ end else begin
+ AddElement(nftDateTimeSep, FToken);
+ FToken := token;
+ end;
+ end;
+ '[':
+ begin
+ ScanBrackets;
+ FToken := NextToken;
+ end;
+ 'A', 'a':
+ ScanAMPM;
+ ',', '-':
+ begin
+ AddElement(nftText, FToken);
+ FToken := NextToken;
+ end
+ else
+ // char pointer must be at end of date/time mask.
+ FToken := PrevToken;
+ Exit;
+ end;
+ end;
+end;
+
+procedure TsNumFormatParser.ScanFormat;
+var
+ done: Boolean;
+ n: Integer;
+ uch: Cardinal;
+begin
+ done := false;
+ while (FCurrent < FEnd) and (FStatus = psOK) and (not done) do begin
+ case FToken of
+ '\': // Excel: add next character literally
+ begin
+ FToken := NextToken;
+ AddElement(nftText, FToken);
+ end;
+ '*': // Excel: repeat next character to fill cell. For accounting format.
+ begin
+ FToken := NextToken;
+ AddElement(nftRepeat, FToken);
+ end;
+ '_': // Excel: Leave width of next character empty
+ begin
+ FToken := NextToken;
+ uch := UTF8CharacterToUnicode(FCurrent, n);
+ if n > 1 then
+ begin
+ AddElement(nftEmptyCharWidth, UnicodeToUTF8(uch));
+ inc(FCurrent, n-1);
+ FToken := NextToken;
+ Continue;
+ end else
+ AddElement(nftEmptyCharWidth, FToken);
+ end;
+ '@': // Excel: Indicates text format
+ begin
+ AddElement(nftTextFormat, FToken);
+ end;
+ '"':
+ ScanQuotedText;
+ '(', ')':
+ AddElement(nftSignBracket, FToken);
+ '0', '#', '?', '.', ',', '-':
+ ScanNumber;
+ 'y', 'Y', 'm', 'M', 'd', 'D', 'h', 'N', 'n', 's':
+ ScanDateTime;
+ '[':
+ ScanBrackets;
+ ' ':
+ AddElement(nftSpace, FToken);
+ 'A', 'a':
+ begin
+ ScanAMPM;
+ FToken := PrevToken;
+ end;
+ 'G', 'g':
+ ScanGeneral;
+ ';': // End of the section. Important: Cursor must stay on ';'
+ begin
+ AddSection;
+ Exit;
+ end;
+ else
+ uch := UTF8CharacterToUnicode(FCurrent, n);
+ if n > 1 then
+ begin
+ AddElement(nftText, UnicodeToUTF8(uch));
+ inc(FCurrent, n-1);
+ end else
+ AddElement(nftText, FToken);
+ end;
+ FToken := NextToken;
+ end;
+end;
+
+{ Scans for the word "General", it may be used like other tokens }
+procedure TsNumFormatParser.ScanGeneral;
+begin
+ FStatus := psErrGeneralExpected;
+ FToken := NextToken;
+ if not (FToken in ['e', 'E']) then exit;
+ FToken := NextToken;
+ if not (FToken in ['n', 'N']) then exit;
+ FToken := NextToken;
+ if not (FToken in ['e', 'E']) then exit;
+ FToken := NextToken;
+ if not (FToken in ['r', 'R']) then exit;
+ FToken := NextToken;
+ if not (FToken in ['a', 'A']) then exit;
+ FToken := NextToken;
+ if not (FToken in ['l', 'L']) then exit;
+ AddElement(nftGeneral);
+ FStatus := psOK;
+end;
+
+{ Scans a floating point format. Procedure is left with the cursor at the last
+ character of the format. }
+procedure TsNumFormatParser.ScanNumber;
+var
+ hasDecSep: Boolean;
+ isFrac: Boolean;
+ n, m: Integer;
+ el: Integer;
+ savedCurrent: PChar;
+ thSep: Char;
+begin
+ hasDecSep := false;
+ isFrac := false;
+ thSep := ',';
+ while (FCurrent < FEnd) and (FStatus = psOK) do begin
+ case FToken of
+ ',': AddElement(nftThSep, ',');
+ '.': begin
+ AddElement(nftDecSep, '.');
+ hasDecSep := true;
+ end;
+ '#': begin
+ ScanAndCount('#', n);
+ savedCurrent := FCurrent;
+ if not (hasDecSep or isFrac) and (n = 1) and (FToken = thSep) then
+ begin
+ m := 0;
+ FToken := NextToken;
+ ScanAndCount('#', n);
+ case n of
+ 0: begin
+ ScanAndCount('0', n);
+ ScanAndCount(thSep, m);
+ FToken := prevToken;
+ if n = 3 then
+ AddElement(nftIntTh, 3, ',')
+ else
+ FCurrent := savedCurrent;
+ end;
+ 1: begin
+ ScanAndCount('0', n);
+ ScanAndCount(thSep, m);
+ FToken := prevToken;
+ if n = 2 then
+ AddElement(nftIntTh, 2, ',')
+ else
+ FCurrent := savedCurrent;
+ end;
+ 2: begin
+ ScanAndCount('0', n);
+ ScanAndCount(thSep, m);
+ FToken := prevToken;
+ if (n = 1) then
+ AddElement(nftIntTh, 1, ',')
+ else
+ FCurrent := savedCurrent;
+ end;
+ end;
+ if m > 0 then
+ AddElement(nftFactor, m, thSep);
+ end else
+ begin
+ FToken := PrevToken;
+ if isFrac then
+ AddElement(nftFracDenomOptDigit, n)
+ else
+ if hasDecSep then
+ AddElement(nftOptDecs, n)
+ else
+ AddElement(nftIntOptDigit, n);
+ end;
+ end;
+ '0': begin
+ ScanAndCount('0', n);
+ ScanAndCount(thSep, m);
+ FToken := PrevToken;
+ if hasDecSep then
+ AddElement(nftZeroDecs, n)
+ else
+ if isFrac then
+ AddElement(nftFracDenomZeroDigit, n)
+ else
+ AddElement(nftIntZeroDigit, n);
+ if m > 0 then
+ AddElement(nftFactor, m, thSep);
+ end;
+ '1'..'9':
+ begin
+ if isFrac then
+ begin
+ n := 0;
+ while (FToken in ['1'..'9','0']) do
+ begin
+ n := n*10 + StrToInt(FToken);
+ FToken := nextToken;
+ end;
+ AddElement(nftFracDenom, n);
+ end else
+ AddElement(nftText, FToken);
+ end;
+ '?': begin
+ ScanAndCount('?', n);
+ FToken := PrevToken;
+ if hasDecSep then
+ AddElement(nftSpaceDecs, n)
+ else
+ if isFrac then
+ AddElement(nftFracDenomSpaceDigit, n)
+ else
+ AddElement(nftIntSpaceDigit, n);
+ end;
+ 'E', 'e':
+ begin
+ AddElement(nftExpChar, FToken);
+ FToken := NextToken;
+ if FToken in ['+', '-'] then
+ AddElement(nftExpSign, FToken);
+ FToken := NextToken;
+ if FToken = '0' then begin
+ ScanAndCount('0', n);
+ FToken := PrevToken;
+ AddElement(nftExpDigits, n);
+ end;
+ end;
+ '+', '-':
+ AddElement(nftSign, FToken);
+ '%': AddElement(nftPercent, FToken);
+ '/': begin
+ isFrac := true;
+ AddElement(nftFracSymbol, FToken);
+ // go back and replace correct token for numerator
+ el := High(FSections[FCurrSection].Elements);
+ while el > 0 do begin
+ dec(el);
+ case FSections[FCurrSection].Elements[el].Token of
+ nftIntOptDigit:
+ begin
+ FSections[FCurrSection].Elements[el].Token := nftFracNumOptDigit;
+ break;
+ end;
+ nftIntSpaceDigit:
+ begin
+ FSections[FCurrSection].Elements[el].Token := nftFracNumSpaceDigit;
+ break;
+ end;
+ nftIntZeroDigit:
+ begin
+ FSections[FCurrSection].Elements[el].Token := nftFracNumZeroDigit;
+ break;
+ end;
+ end;
+ end;
+ end;
+ 'G', 'g':
+ ScanGeneral;
+ else
+ FToken := PrevToken;
+ Exit;
+ end;
+ FToken := NextToken;
+ end;
+end;
+
+{ Scans a text in quotation marks. Tries to interpret the text as a currency
+ symbol (--> AnalyzeText).
+ The procedure is entered and left with the cursor at a quotation mark. }
+procedure TsNumFormatParser.ScanQuotedText;
+var
+ s: String;
+begin
+ s := '';
+ FToken := NextToken; // Cursor war at '"'
+ while (FCurrent < FEnd) and (FStatus = psOK) do begin
+ if FToken = '"' then begin
+ if AnalyzeCurrency(s) then
+ AddElement(nftCurrSymbol, s)
+ else
+ AddElement(nftText, s);
+ exit;
+ end else begin
+ s := s + FToken;
+ FToken := NextToken;
+ end;
+ end;
+ // When the procedure gets here the final quotation mark is missing
+ FStatus := psErrQuoteExpected;
+end;
+
+procedure TsNumFormatParser.SetDecimals(AValue: Byte);
+var
+ i, j, n: Integer;
+ foundDecs: Boolean;
+begin
+ foundDecs := false;
+ for j := 0 to High(FSections) do begin
+ n := Length(FSections[j].Elements);
+ i := n-1;
+ while (i > -1) do begin
+ case FSections[j].Elements[i].Token of
+ nftDecSep: // this happens, e.g., for "0.E+00"
+ if (AValue > 0) and not foundDecs then begin
+ InsertElement(j, i, nftZeroDecs, AValue);
+ break;
+ end;
+ nftIntOptDigit, nftIntZeroDigit, nftIntSpaceDigit, nftIntTh:
+ // no decimals so far --> add decimal separator and decimals element
+ if (AValue > 0) then begin
+ // Don't use "AddElements" because nfCurrency etc have elements after the number.
+ InsertElement(j, i, nftDecSep, '.');
+ InsertElement(j, i+1, nftZeroDecs, AValue);
+ break;
+ end;
+ nftZeroDecs, nftOptDecs, nftSpaceDecs:
+ begin
+ foundDecs := true;
+ if AValue > 0 then begin
+ // decimals are already used, just replace value of decimal places
+ FSections[j].Elements[i].IntValue := AValue;
+ FSections[j].Elements[i].Token := nftZeroDecs;
+ break;
+ end else begin
+ // No decimals any more: delete decs and decsep elements
+ DeleteElement(j, i);
+ DeleteElement(j, i-1);
+ break;
+ end;
+ end;
+ end;
+ dec(i);
+ end;
+ end;
+end;
+
end.
diff --git a/components/fpspreadsheet/fpsopendocument.pas b/components/fpspreadsheet/source/common/fpsopendocument.pas
old mode 100755
new mode 100644
similarity index 99%
rename from components/fpspreadsheet/fpsopendocument.pas
rename to components/fpspreadsheet/source/common/fpsopendocument.pas
index de296ebaa..9d3427e63
--- a/components/fpspreadsheet/fpsopendocument.pas
+++ b/components/fpspreadsheet/source/common/fpsopendocument.pas
@@ -26,7 +26,7 @@ unit fpsopendocument;
{$mode objfpc}{$H+}
{$endif}
-{$I fps.inc}
+{$I ..\fps.inc}
{.$define FPSPREADDEBUG} //used to be XLSDEBUG
@@ -42,7 +42,7 @@ uses
fpszipper,
{$ENDIF}
fpstypes, fpspreadsheet, fpsReaderWriter, fpsutils, fpsHeaderFooterParser,
- fpsNumFormat, fpsNumFormatParser, fpsxmlcommon, fpsPagelayout;
+ fpsNumFormat, fpsxmlcommon, fpsPagelayout;
type
TDateModeODS=(
@@ -286,7 +286,7 @@ uses
fpsPatches,
{$ENDIF}
fpsStrings, fpsStreams, fpsClasses, fpsExprParser,
- fpsRegFileFormats, fpsImages;
+ fpsImages;
const
{ OpenDocument general XML constants }
@@ -5510,8 +5510,8 @@ begin
headerRows := false;
firstRepeatedPrintRow := ASheet.PageLayout.RepeatedRows.FirstIndex;
lastRepeatedPrintRow := ASheet.PageLayout.RepeatedRows.LastIndex;
- if (firstRepeatedPrintRow <> UNASSIGNED_ROW_COL_INDEX) and
- (lastRepeatedPrintRow = UNASSIGNED_ROW_COL_INDEX)
+ if (firstRepeatedPrintRow <> Integer(UNASSIGNED_ROW_COL_INDEX)) and
+ (lastRepeatedPrintRow = Integer(UNASSIGNED_ROW_COL_INDEX))
then
lastRepeatedPrintRow := firstRepeatedPrintRow;
diff --git a/components/fpspreadsheet/fpspagelayout.pas b/components/fpspreadsheet/source/common/fpspagelayout.pas
similarity index 100%
rename from components/fpspreadsheet/fpspagelayout.pas
rename to components/fpspreadsheet/source/common/fpspagelayout.pas
diff --git a/components/fpspreadsheet/fpspalette.pas b/components/fpspreadsheet/source/common/fpspalette.pas
similarity index 100%
rename from components/fpspreadsheet/fpspalette.pas
rename to components/fpspreadsheet/source/common/fpspalette.pas
diff --git a/components/fpspreadsheet/fpspatches.pas b/components/fpspreadsheet/source/common/fpspatches.pas
similarity index 98%
rename from components/fpspreadsheet/fpspatches.pas
rename to components/fpspreadsheet/source/common/fpspatches.pas
index c2dd5a26d..cd1c919c9 100644
--- a/components/fpspreadsheet/fpspatches.pas
+++ b/components/fpspreadsheet/source/common/fpspatches.pas
@@ -8,7 +8,7 @@
unit fpspatches;
{$mode objfpc}{$H+}
-{$I fps.inc}
+{$I ..\fps.inc}
interface
@@ -29,6 +29,27 @@ uses
Flags: TReplaceFlags; ALanguage: string=''): String;
function UTF8LowerCase(const AInStr: string; ALanguage: string=''): string;
function UTF8UpperCase(const AInStr: string; ALanguage: string=''): string;
+
+ // implemented in LazFileUtils (Laz 1.2)
+ procedure ForcePathDelims(var FileName: String);
+{$ENDIF}
+
+{$IFDEF FPS_PTRINT}
+type
+ {$IFDEF CPU64}
+ PtrInt = Int64;
+ {$ENDIF}
+ {$IFDEF CPU32}
+ PtrInt = Longint;
+ {$ENDIF}
+ {$IFDEF CPU16}
+ {$IF DEFINED(FPC_X86_DATA_FAR) OR DEFINED(FPC_X86_DATA_HUGE)}
+ PtrInt = Longint;
+ {$ELSE}
+ PtrInt = Integer;
+ {$ENDIF}
+ {$ENDIF CPU16}
+ IntPtr = PtrInt;
{$ENDIF}
@@ -1693,6 +1714,21 @@ begin
// Final correction of the buffer size
SetLength(Result,OutCounter);
end;
+
+procedure ForcePathDelims(var FileName: string);
+var
+ i: Integer;
+begin
+ for i:=1 to Length(FileName) do
+ {$IFDEF Windows}
+ if Filename[i]='/' then
+ Filename[i]:='\';
+ {$ELSE}
+ if Filename[i]='\' then
+ Filename[i]:='/';
+ {$ENDIF}
+end;
+
{$ENDIF}
end.
diff --git a/components/fpspreadsheet/fpspreadsheet.pas b/components/fpspreadsheet/source/common/fpspreadsheet.pas
old mode 100755
new mode 100644
similarity index 99%
rename from components/fpspreadsheet/fpspreadsheet.pas
rename to components/fpspreadsheet/source/common/fpspreadsheet.pas
index b9c1c0011..6e979c8a0
--- a/components/fpspreadsheet/fpspreadsheet.pas
+++ b/components/fpspreadsheet/source/common/fpspreadsheet.pas
@@ -1,16 +1,5 @@
-{**
- Unit: fpspreadsheet
-
- implements **spreadsheet documents** and their properties and methods.
-
- AUTHORS: Felipe Monteiro de Carvalho, Reinier Olislagers, Werner Pamler
-
- LICENSE: See the file COPYING.modifiedLGPL.txt, included in the Lazarus
- distribution, for details about the license.
-}
-
{@@ ----------------------------------------------------------------------------
- Unit fpspreadsheet implements spreadsheet documents and their
+ Unit fpspreadsheet implements spreadsheet documents and their
properties and methods.
AUTHORS: Felipe Monteiro de Carvalho, Reinier Olislagers, Werner Pamler
@@ -25,7 +14,7 @@ unit fpspreadsheet;
// {$mode objpas}{$H+}
{$endif}
-{$include fps.inc}
+{$include ..\fps.inc}
interface
@@ -866,9 +855,8 @@ implementation
uses
Math, StrUtils, DateUtils, TypInfo, lazutf8, lazFileUtils, URIParser,
- fpsStrings, uvirtuallayer_ole,
- fpsUtils, fpsHTMLUtils, fpsRegFileFormats, fpsReaderWriter,
- fpsCurrency, fpsExprParser, fpsNumFormatParser;
+ uvirtuallayer_ole, {%H-}fpsPatches, fpsStrings, fpsUtils, fpsHTMLUtils,
+ fpsReaderWriter, fpsCurrency, fpsExprParser;
(*
const
@@ -4268,10 +4256,8 @@ end;
procedure TsWorksheet.WriteText(ACell: PCell; AText: String;
ARichTextParams: TsRichTextParams = nil);
var
- r, c: Cardinal;
i: Integer;
hyperlink: TsHyperlink;
- fmt: TsCellFormat;
begin
if ACell = nil then
exit;
@@ -4287,8 +4273,6 @@ begin
end;
end;
- fmt := Workbook.GetCellFormat(ACell^.FormatIndex);
-
if (AText = '') then
begin
{ Initially, the cell was destroyed here if AText = '' and the cell is not
@@ -7658,7 +7642,6 @@ end;
-------------------------------------------------------------------------------}
procedure TsWorkbook.GetLastRowColIndex(out ALastRow, ALastCol: Cardinal);
var
- i: Integer;
sheet: TsWorksheet;
begin
ALastRow := 0;
diff --git a/components/fpspreadsheet/fpsreaderwriter.pas b/components/fpspreadsheet/source/common/fpsreaderwriter.pas
similarity index 62%
rename from components/fpspreadsheet/fpsreaderwriter.pas
rename to components/fpspreadsheet/source/common/fpsreaderwriter.pas
index cfe80aa80..b237e5194 100644
--- a/components/fpspreadsheet/fpsreaderwriter.pas
+++ b/components/fpspreadsheet/source/common/fpsreaderwriter.pas
@@ -2,12 +2,15 @@
{@@ ----------------------------------------------------------------------------
Unit fpsReaderWriter implements basic reading/writing support
- for fpspreadsheet.
+ for fpspreadsheet, as well as registration of the file formats supported.
AUTHORS: Felipe Monteiro de Carvalho, Reinier Olislagers, Werner Pamler
LICENSE: See the file COPYING.modifiedLGPL.txt, included in the Lazarus
distribution, for details about the license.
+
+ USAGE: Each unit implementing a new spreadsheet format must register the
+ reader/writer and some specific data by calling "RegisterSpreadFormat".
-------------------------------------------------------------------------------}
unit fpsReaderWriter;
@@ -181,6 +184,33 @@ type
end;
+type
+ TsSpreadFileAccess = (faRead, faWrite);
+
+function RegisterSpreadFormat(
+ AFormat: TsSpreadsheetFormat;
+ AReaderClass: TsSpreadReaderClass;
+ AWriterClass: TsSpreadWriterClass;
+ AFormatName, ATechnicalName: String;
+ const AFileExtensions: array of String): TsSpreadFormatID;
+
+function GetFileFormatFilter(AListSeparator, AExtSeparator: Char;
+ AFileAccess: TsSpreadFileAccess; const APriorityFormats: array of TsSpreadFormatID;
+ AllSpreadFormats: Boolean = false; AllExcelFormats: Boolean = false): String;
+
+function GetSpreadFormats(AFileAccess: TsSpreadFileAccess;
+ const APriorityFormats: array of TsSpreadFormatID): TsSpreadFormatIDArray;
+function GetSpreadFormatsFromFileName(AFileAccess: TsSpreadFileAccess; AFileName: TFileName;
+ APriorityFormat: TsSpreadFormatID = sfidUnknown): TsSpreadFormatIDArray;
+
+function GetSpreadFormatExt(AFormatID: TsSpreadFormatID): String;
+function GetSpreadFormatName(AFormatID: TsSpreadFormatID): String;
+function GetSpreadTechnicalName(AFormatID: TsSpreadFormatID): String;
+
+function GetSpreadReaderClass(AFormatID: TsSpreadFormatID): TsSpreadReaderClass;
+function GetSpreadWriterClass(AFormatID: TsSpreadFormatID): TsSpreadWriterClass;
+
+
implementation
uses
@@ -331,7 +361,7 @@ begin
// If the count of columns is equal to the max colcount of the file format
// then it is likely that dummy columns have been added -> delete all empty
// columns (starting at the right) until the first non-empty column is found
- if AWorksheet.Cols.Count = FLimitations.MaxColCount then
+ if AWorksheet.Cols.Count = SizeInt(FLimitations.MaxColCount) then
begin
c := AWorksheet.Cols.Count - 1;
lCol := PCol(AWorksheet.Cols[c]);
@@ -781,5 +811,522 @@ begin
raise Exception.Create(rsUnsupportedWriteFormat);
end;
+type
+ TsSpreadFormatData = class
+ private
+ FFormatID: TsSpreadFormatID; // Format identifier
+ FName: String; // Text to be used in FileDialog filter
+ FTechnicalName: String; // Text to be used e.g. in Titlebar
+ FFileExtensions: array of String; // File extensions used by this format
+ FReaderClass: TsSpreadReaderClass; // Class for reading these files
+ FWriterClass: TsSpreadWriterClass; // Class for writing these files
+ function GetFileExtension(AIndex: Integer): String;
+ function GetFileExtensionCount: Integer;
+ public
+ constructor Create(AFormatID: TsSpreadFormatID; AReaderClass: TsSpreadReaderClass;
+ AWriterClass: TsSpreadWriterClass; AFormatName, ATechnicalName: String;
+ const AExtensions: Array of String);
+// ACanReadFromClipboard, ACanWriteToClipboard: Boolean);
+ function GetFileFilterMask(ASeparator: Char): String;
+
+// property CanReadFromClipboard: boolean read FCanReadClipboard;
+// property CanWriteToClipboard: boolean read FCanWriteClipboard;
+ property FormatID: TsSpreadFormatID read FFormatID;
+ property FormatName: String read FName;
+ property FileExtension[AIndex: Integer]: String read GetFileExtension;
+ property FileExtensionCount: Integer read GetFileExtensionCount;
+ property ReaderClass: TsSpreadReaderClass read FReaderClass;
+ property TechnicalName: String read FTechnicalName;
+ property WriterClass: TsSpreadWriterClass read FWriterClass;
+ end;
+
+ { TsSpreadFormatRegistry }
+
+ TsSpreadFormatRegistry = class
+ private
+ FList: TFPList;
+ FCachedData: TsSpreadFormatData;
+ FCachedFormatID: TsSpreadFormatID;
+ function GetDefaultExt(AFormatID: TsSpreadFormatID): String;
+ function GetFormatName(AFormatID: TsSpreadFormatID): String;
+ function GetReaderClass(AFormatID: TsSpreadFormatID): TsSpreadReaderClass;
+ function GetTechnicalName(AFormatID: TsSpreadFormatID): String;
+ function GetWriterClass(AFormatID: TsSpreadFormatID): TsSpreadWriterClass;
+ protected
+ function Add(AData: TsSpreadFormatData): Integer;
+ function FindFormatID(AFormatID: TsSpreadFormatID): TsSpreadFormatData;
+ function IndexOf(AFormatID: TsSpreadFormatID): Integer;
+ public
+ constructor Create;
+ destructor Destroy; override;
+ function GetAllSpreadFilesMask(AExtSeparator: Char;
+ AFileAccess: TsSpreadFileAccess): String;
+ function GetAllExcelFilesMask(AExtSeparator: Char): String;
+ function GetFileFilter(AListSeparator, AExtSeparator: Char;
+ AFileAccess: TsSpreadFileAccess; const APriorityFormats: array of TsSpreadFormatID;
+ AllSpreadFormats: Boolean = false; AllExcelFormats: Boolean = false): String;
+ function GetFormatArray(AFileAccess: TsSpreadFileAccess;
+ const APriorityFormats: array of TsSpreadFormatID): TsSpreadFormatIDArray;
+ function GetFormatArrayFromFileName(AFileAccess: TsSpreadFileAccess;
+ const AFileName: String; APriorityFormat: TsSpreadFormatID = sfidUnknown): TsSpreadFormatIDArray;
+
+ property DefaultExt[AFormatID: TsSpreadFormatID]: String read GetDefaultExt;
+ property FormatName[AFormatID: TsSpreadFormatID]: String read GetFormatName;
+ property ReaderClass[AFormatID: TsSpreadFormatID]: TsSpreadReaderClass read GetReaderClass;
+ property TechnicalName[AFormatID: TsSpreadFormatID]: String read GetTechnicalName;
+ property WriterClass[AFormatID: TsSpreadFormatID]: TsSpreadWriterClass read GetWriterClass;
+ end;
+
+var
+ SpreadFormatRegistry: TsSpreadFormatRegistry;
+
+{==============================================================================}
+{ TsSpreadFormatData }
+{==============================================================================}
+
+constructor TsSpreadFormatData.Create(AFormatID: TsSpreadFormatID;
+ AReaderClass: TsSpreadReaderClass; AWriterClass: TsSpreadWriterClass;
+ AFormatName, ATechnicalName: String; const AExtensions: array of String);
+var
+ i: Integer;
+begin
+ FFormatID := AFormatID;
+ FReaderClass := AReaderClass;
+ FWriterClass := AWriterClass;
+ FName := AFormatName;
+ FTechnicalName := ATechnicalName;
+ SetLength(FFileExtensions, Length(AExtensions));
+ for i:=0 to High(FFileExtensions) do FFileExtensions[i] := AExtensions[i];
+end;
+
+function TsSpreadFormatData.GetFileExtension(AIndex: Integer): String;
+begin
+ Result := FFileExtensions[AIndex];
+end;
+
+function TsSpreadFormatData.GetFileExtensionCount: Integer;
+begin
+ Result := Length(FFileExtensions);
+end;
+
+function TsSpreadFormatData.GetFileFilterMask(ASeparator: Char): String;
+var
+ i: Integer;
+begin
+ Result := '*' + FFileExtensions[0];
+ for i:= 1 to High(FFileExtensions) do
+ Result := Result + ASeparator + '*' + FFileExtensions[i];
+end;
+
+
+{==============================================================================}
+{ TsSpreadFormatRegistry }
+{==============================================================================}
+
+constructor TsSpreadFormatRegistry.Create;
+begin
+ inherited;
+ FList := TFPList.Create;
+ FCachedFormatID := sfidUnknown;
+ FCachedData := nil;
+end;
+
+destructor TsSpreadFormatRegistry.Destroy;
+var
+ i: Integer;
+begin
+ for i := FList.Count-1 downto 0 do TObject(FList[i]).Free;
+ FList.Free;
+
+ inherited;
+end;
+
+function TsSpreadFormatRegistry.Add(AData: TsSpreadFormatData): Integer;
+begin
+ Result := FList.Add(AData);
+end;
+
+function TsSpreadFormatRegistry.FindFormatID(AFormatID: TsSpreadFormatID): TsSpreadFormatData;
+var
+ idx: Integer;
+begin
+ if AFormatID <> FCachedFormatID then
+ begin
+ idx := IndexOf(AFormatID);
+ if idx = -1 then
+ begin
+ FCachedData := nil;
+ FCachedFormatID := sfidUnknown;
+ end else
+ begin
+ FCachedData := TsSpreadFormatData(FList[idx]);
+ FCachedFormatID := AFormatID;
+ end;
+ end;
+ Result := FCachedData;
+end;
+
+function TsSpreadFormatRegistry.GetDefaultExt(AFormatID: TsSpreadFormatID): String;
+var
+ data: TsSpreadFormatData;
+begin
+ data := FindFormatID(AFormatID);
+ if data <> nil then
+ Result := data.FileExtension[0] else
+ Result := '';
+end;
+
+function TsSpreadFormatRegistry.GetAllSpreadFilesMask(AExtSeparator: Char;
+ AFileAccess: TsSpreadFileAccess): String;
+var
+ L: TStrings;
+ data: TsSpreadFormatData;
+ ext: String;
+ i, j: Integer;
+begin
+ Result := '';
+ L := TStringList.Create;
+ try
+ for i:=0 to FList.Count-1 do
+ begin
+ data := TsSpreadFormatData(FList[i]);
+ case AFileAccess of
+ faRead : if data.ReaderClass = nil then continue;
+ faWrite : if data.WriterClass = nil then continue;
+ end;
+ for j:=0 to data.FileExtensionCount-1 do
+ begin
+ ext := data.FileExtension[j];
+ if L.IndexOf(ext) = -1 then
+ L.Add(ext);
+ end;
+ end;
+ if L.Count > 0 then
+ begin
+ Result := '*' + L[0];
+ for i := 1 to L.Count-1 do
+ Result := Result + AExtSeparator + '*' + L[i];
+ end;
+ finally
+ L.Free;
+ end;
+end;
+
+function TsSpreadFormatRegistry.GetAllExcelFilesMask(AExtSeparator: Char): String;
+var
+ j: Integer;
+ L: TStrings;
+ data: TsSpreadFormatData;
+ ext: String;
+begin
+ L := TStringList.Create;
+ try
+ // good old BIFF...
+ if (IndexOf(ord(sfExcel8)) <> -1) or
+ (IndexOf(ord(sfExcel5)) <> -1) or
+ (IndexOf(ord(sfExcel2)) <> -1) then L.Add('*.xls');
+
+ // Excel 2007+
+ j := IndexOf(ord(sfOOXML));
+ if j <> -1 then
+ begin
+ data := TsSpreadFormatData(FList[j]);
+ for j:=0 to data.FileExtensionCount-1 do
+ begin
+ ext := data.FileExtension[j];
+ if L.IndexOf(ext) = -1 then
+ L.Add('*' + ext);
+ end;
+ end;
+
+ L.Delimiter := AExtSeparator;
+ L.StrictDelimiter := true;
+ Result := L.DelimitedText;
+ finally
+ L.Free;
+ end;
+end;
+
+function TsSpreadFormatRegistry.GetFileFilter(AListSeparator, AExtSeparator: Char;
+ AFileAccess: TsSpreadFileAccess; const APriorityFormats: array of TsSpreadFormatID;
+ AllSpreadFormats: Boolean = false; AllExcelFormats: Boolean = false): String;
+var
+ i, idx: Integer;
+ L: TStrings;
+ s: String;
+ data: TsSpreadFormatData;
+begin
+ // Bring the formats listed in APriorityFormats to the top
+ if Length(APriorityFormats) > 0 then
+ for i := High(APriorityFormats) downto Low(APriorityFormats) do
+ begin
+ idx := IndexOf(APriorityFormats[i]);
+ data := TsSpreadFormatData(FList[idx]);
+ FList.Delete(idx);
+ FList.Insert(0, data);
+ end;
+
+ L := TStringList.Create;
+ try
+ L.Delimiter := AListSeparator;
+ L.StrictDelimiter := true;
+ if AllSpreadFormats then
+ begin
+ s := GetAllSpreadFilesMask(AExtSeparator, AFileAccess);
+ if s <> '' then
+ begin
+ L.Add(rsAllSpreadsheetFiles);
+ L.Add(GetAllSpreadFilesMask(AExtSeparator, AFileAccess));
+ end;
+ end;
+ if AllExcelFormats then
+ begin
+ s := GetAllExcelFilesMask(AExtSeparator);
+ if s <> '' then
+ begin
+ L.Add(Format('%s (%s)', [rsAllExcelFiles, s]));
+ L.Add(s);
+ end;
+ end;
+ for i:=0 to FList.Count-1 do
+ begin
+ data := TsSpreadFormatData(FList[i]);
+ case AFileAccess of
+ faRead : if data.ReaderClass = nil then Continue;
+ faWrite : if data.WriterClass = nil then Continue;
+ end;
+ s := data.GetFileFilterMask(AExtSeparator);
+ L.Add(Format('%s %s (%s)', [data.FormatName, rsFiles, s]));
+ L.Add(s);
+ end;
+ Result := L.DelimitedText;
+ finally
+ L.Free;
+ end;
+end;
+
+function TsSpreadFormatRegistry.GetFormatArray(AFileAccess: TsSpreadFileAccess;
+ const APriorityFormats: array of TsSpreadFormatID): TsSpreadFormatIDArray;
+var
+ i, n, idx: Integer;
+ data: TsSpreadFormatData;
+begin
+ // Rearrange the formats such the one noted in APriorityFormats are at the top
+ if Length(APriorityFormats) > 0 then
+ for i := High(APriorityFormats) downto Low(APriorityFormats) do
+ begin
+ idx := IndexOf(APriorityFormats[i]);
+ data := TsSpreadFormatData(FList[idx]);
+ FList.Delete(idx);
+ FList.Insert(0, data);
+ end;
+
+ SetLength(Result, FList.Count);
+ n := 0;
+ for i := 0 to FList.Count-1 do
+ begin
+ data := TsSpreadFormatData(FList[i]);
+ case AFileAccess of
+ faRead : if data.ReaderClass = nil then Continue;
+ faWrite : if data.WriterClass = nil then Continue;
+ end;
+ Result[n] := data.FormatID;
+ inc(n);
+ end;
+ SetLength(Result, n);
+end;
+
+function TsSpreadFormatRegistry.GetFormatArrayFromFileName(
+ AFileAccess: TsSpreadFileAccess; const AFileName: String;
+ APriorityFormat: TsSpreadFormatID = sfidUnknown): TsSpreadFormatIDArray;
+var
+ idx: Integer;
+ i, j, n: Integer;
+ ext: String;
+ data: TsSpreadFormatData;
+begin
+ ext := Lowercase(ExtractFileExt(AFileName));
+
+ if APriorityFormat <> sfidUnknown then
+ begin
+ // Bring the priority format to the top
+ idx := IndexOf(APriorityFormat);
+ FList.Exchange(0, idx);
+ end;
+
+ SetLength(Result, FList.Count);
+ n := 0;
+ for i := 0 to FList.Count - 1 do
+ begin
+ data := TsSpreadFormatData(FList[i]);
+ case AFileAccess of
+ faRead : if data.ReaderClass = nil then Continue;
+ faWrite : if data.WriterClass = nil then Continue;
+ end;
+ for j:=0 to data.FileExtensionCount-1 do
+ if Lowercase(data.FileExtension[j]) = ext then
+ begin
+ Result[n] := data.FormatID;
+ inc(n);
+ end;
+ end;
+
+
+ SetLength(Result, n);
+
+ if APriorityFormat <> sfidUnknown then
+ // Restore original order
+ FList.Exchange(idx, 0);
+end;
+
+function TsSpreadFormatRegistry.GetFormatName(AFormatID: TsSpreadFormatID): String;
+var
+ data: TsSpreadFormatData;
+begin
+ data := FindFormatID(AFormatID);
+ if data <> nil then
+ Result := data.FormatName else
+ Result := '';
+end;
+
+function TsSpreadFormatRegistry.GetReaderClass(AFormatID: TsSpreadFormatID): TsSpreadReaderClass;
+var
+ data: TsSpreadFormatData;
+begin
+ data := FindFormatID(AFormatID);
+ if data <> nil then
+ Result := data.ReaderClass else
+ Result := nil;
+end;
+
+function TsSpreadFormatRegistry.GetTechnicalName(AFormatID: TsSpreadFormatID): String;
+var
+ data: TsSpreadFormatData;
+begin
+ data := FindFormatID(AFormatID);
+ if data <> nil then
+ Result := data.TechnicalName else
+ Result := '';
+end;
+
+function TsSpreadFormatRegistry.GetWriterClass(AFormatID: TsSpreadFormatID): TsSpreadWriterClass;
+var
+ data: TsSpreadFormatData;
+begin
+ data := FindFormatID(AFormatID);
+ if data <> nil then
+ Result := data.WriterClass else
+ Result := nil;
+end;
+
+function TsSpreadFormatRegistry.IndexOf(AFormatID: TsSpreadFormatID): Integer;
+begin
+ for Result := 0 to FList.Count - 1 do
+ if TsSpreadFormatData(FList[Result]).FormatID = AFormatID then
+ exit;
+ Result := -1;
+end;
+
+
+{==============================================================================}
+{ Public utility functions }
+{==============================================================================}
+
+{@@ ----------------------------------------------------------------------------
+ Registers a new reader/writer pair for a given spreadsheet file format
+
+ AFormat identifies the file format, see sfXXXX declarations in built-in
+ fpstypes.
+
+ The system is open to user-defined formats. In this case, AFormat must have
+ the value "sfUser". The format identifier is calculated as a negative number,
+ stored in the TsSpreadFormatData class and returned as function result.
+ This value is needed when calling fpspreadsheet's ReadFromXXXX and WriteToXXXX
+ methods to specify the file format.
+-------------------------------------------------------------------------------}
+function RegisterSpreadFormat(AFormat: TsSpreadsheetFormat;
+ AReaderClass: TsSpreadReaderClass; AWriterClass: TsSpreadWriterClass;
+ AFormatName, ATechnicalName: String; const AFileExtensions: array of String): TsSpreadFormatID;
+var
+ fmt: TsSpreadFormatData;
+ n: Integer;
+begin
+ if AFormat <> sfUser then begin
+ n := SpreadFormatRegistry.IndexOf(ord(AFormat));
+ if n >= 0 then
+ raise Exception.Create('[RegisterSpreadFormat] Spreadsheet format is already registered.');
+ end;
+
+ if Length(AFileExtensions) = 0 then
+ raise Exception.Create('[RegisterSpreadFormat] File extensions needed for registering a file format.');
+
+ if (AFormatName = '') or (ATechnicalName = '') then
+ raise Exception.Create('[RegisterSpreadFormat] File format name is not specified.');
+
+ fmt := TsSpreadFormatData.Create(ord(AFormat), AReaderClass, AWriterClass,
+ AFormatName, ATechnicalName, AFileExtensions);
+ n := SpreadFormatRegistry.Add(fmt);
+ if (AFormat = sfUser) then
+ begin
+ if (n <= ord(sfUser)) then n := n + ord(sfUser) + 1;
+ fmt.FFormatID := -n;
+ end;
+ Result := fmt.FormatID;
+end;
+
+function GetFileFormatFilter(AListSeparator, AExtSeparator: Char;
+ AFileAccess: TsSpreadFileAccess; const APriorityFormats: array of TsSpreadFormatID;
+ AllSpreadFormats: Boolean = false; AllExcelFormats: Boolean = false): String;
+begin
+ Result := SpreadFormatRegistry.GetFileFilter(AListSeparator, AExtSeparator,
+ AFileAccess, APriorityFormats, AllSpreadFormats, AllExcelFormats);
+end;
+
+function GetSpreadFormats(AFileAccess: TsSpreadFileAccess;
+ const APriorityFormats: array of TsSpreadFormatID): TsSpreadFormatIDArray;
+begin
+ Result := SpreadFormatRegistry.GetFormatArray(AFileAccess, APriorityFormats);
+end;
+
+function GetSpreadFormatsFromFileName(
+ AFileAccess: TsSpreadFileAccess; AFileName: TFileName;
+ APriorityFormat: TsSpreadFormatID = sfidUnknown): TsSpreadFormatIDArray;
+begin
+ Result := SpreadFormatRegistry.GetFormatArrayFromFileName(
+ AFileAccess, AFileName, APriorityFormat);
+end;
+
+function GetSpreadFormatExt(AFormatID: TsSpreadFormatID): String;
+begin
+ Result := SpreadFormatRegistry.DefaultExt[AFormatID];
+end;
+
+function GetSpreadFormatName(AFormatID: TsSpreadFormatID): String;
+begin
+ Result := SpreadFormatRegistry.FormatName[AFormatID];
+end;
+
+function GetSpreadTechnicalName(AFormatID: TsSpreadFormatID): String;
+begin
+ Result := SpreadFormatRegistry.TechnicalName[AFormatID];
+end;
+
+function GetSpreadReaderClass(AFormatID: TsSpreadFormatID): TsSpreadReaderClass;
+begin
+ Result := SpreadFormatRegistry.ReaderClass[AFormatID];
+end;
+
+function GetSpreadWriterClass(AFormatID: TsSpreadFormatID): TsSpreadWriterClass;
+begin
+ Result := SpreadFormatRegistry.WriterClass[AFormatID];
+end;
+
+
+initialization
+ SpreadFormatRegistry := TsSpreadFormatRegistry.Create;
+
+finalization
+ SpreadFormatRegistry.Free;
+
end.
diff --git a/components/fpspreadsheet/fpsrpn.pas b/components/fpspreadsheet/source/common/fpsrpn.pas
similarity index 100%
rename from components/fpspreadsheet/fpsrpn.pas
rename to components/fpspreadsheet/source/common/fpsrpn.pas
diff --git a/components/fpspreadsheet/fpssearch.pas b/components/fpspreadsheet/source/common/fpssearch.pas
similarity index 99%
rename from components/fpspreadsheet/fpssearch.pas
rename to components/fpspreadsheet/source/common/fpssearch.pas
index 4c428cb9f..080cb18e2 100644
--- a/components/fpspreadsheet/fpssearch.pas
+++ b/components/fpspreadsheet/source/common/fpssearch.pas
@@ -61,7 +61,7 @@ type
implementation
uses
- lazutf8;
+ lazutf8, {%H-}fpsPatches;
constructor TsSearchEngine.Create(AWorkbook: TsWorkbook);
begin
diff --git a/components/fpspreadsheet/fpsstreams.pas b/components/fpspreadsheet/source/common/fpsstreams.pas
similarity index 100%
rename from components/fpspreadsheet/fpsstreams.pas
rename to components/fpspreadsheet/source/common/fpsstreams.pas
diff --git a/components/fpspreadsheet/fpsstrings.pas b/components/fpspreadsheet/source/common/fpsstrings.pas
similarity index 100%
rename from components/fpspreadsheet/fpsstrings.pas
rename to components/fpspreadsheet/source/common/fpsstrings.pas
diff --git a/components/fpspreadsheet/fpstypes.pas b/components/fpspreadsheet/source/common/fpstypes.pas
similarity index 100%
rename from components/fpspreadsheet/fpstypes.pas
rename to components/fpspreadsheet/source/common/fpstypes.pas
diff --git a/components/fpspreadsheet/fpsutils.pas b/components/fpspreadsheet/source/common/fpsutils.pas
similarity index 99%
rename from components/fpspreadsheet/fpsutils.pas
rename to components/fpspreadsheet/source/common/fpsutils.pas
index c642336f5..27e1a15ef 100644
--- a/components/fpspreadsheet/fpsutils.pas
+++ b/components/fpspreadsheet/source/common/fpsutils.pas
@@ -207,7 +207,7 @@ var
implementation
uses
- Math, lazutf8, lazfileutils, fpsStrings, fpsRegFileFormats;
+ Math, lazutf8, lazfileutils, fpsStrings, fpsReaderWriter;
const
INT_NUM_LETTERS = 26;
diff --git a/components/fpspreadsheet/fpsxmlcommon.pas b/components/fpspreadsheet/source/common/fpsxmlcommon.pas
similarity index 100%
rename from components/fpspreadsheet/fpsxmlcommon.pas
rename to components/fpspreadsheet/source/common/fpsxmlcommon.pas
diff --git a/components/fpspreadsheet/fpszipper.pp b/components/fpspreadsheet/source/common/fpszipper.pp
similarity index 100%
rename from components/fpspreadsheet/fpszipper.pp
rename to components/fpspreadsheet/source/common/fpszipper.pp
diff --git a/components/fpspreadsheet/uvirtuallayer.pas b/components/fpspreadsheet/source/common/uvirtuallayer.pas
similarity index 100%
rename from components/fpspreadsheet/uvirtuallayer.pas
rename to components/fpspreadsheet/source/common/uvirtuallayer.pas
diff --git a/components/fpspreadsheet/uvirtuallayer_ole.pas b/components/fpspreadsheet/source/common/uvirtuallayer_ole.pas
similarity index 100%
rename from components/fpspreadsheet/uvirtuallayer_ole.pas
rename to components/fpspreadsheet/source/common/uvirtuallayer_ole.pas
diff --git a/components/fpspreadsheet/uvirtuallayer_ole_helpers.pas b/components/fpspreadsheet/source/common/uvirtuallayer_ole_helpers.pas
similarity index 100%
rename from components/fpspreadsheet/uvirtuallayer_ole_helpers.pas
rename to components/fpspreadsheet/source/common/uvirtuallayer_ole_helpers.pas
diff --git a/components/fpspreadsheet/uvirtuallayer_ole_types.pas b/components/fpspreadsheet/source/common/uvirtuallayer_ole_types.pas
similarity index 100%
rename from components/fpspreadsheet/uvirtuallayer_ole_types.pas
rename to components/fpspreadsheet/source/common/uvirtuallayer_ole_types.pas
diff --git a/components/fpspreadsheet/uvirtuallayer_stream.pas b/components/fpspreadsheet/source/common/uvirtuallayer_stream.pas
similarity index 100%
rename from components/fpspreadsheet/uvirtuallayer_stream.pas
rename to components/fpspreadsheet/source/common/uvirtuallayer_stream.pas
diff --git a/components/fpspreadsheet/uvirtuallayer_types.pas b/components/fpspreadsheet/source/common/uvirtuallayer_types.pas
similarity index 100%
rename from components/fpspreadsheet/uvirtuallayer_types.pas
rename to components/fpspreadsheet/source/common/uvirtuallayer_types.pas
diff --git a/components/fpspreadsheet/wikitable.pas b/components/fpspreadsheet/source/common/wikitable.pas
similarity index 99%
rename from components/fpspreadsheet/wikitable.pas
rename to components/fpspreadsheet/source/common/wikitable.pas
index 3612d0caa..d7e384b0f 100644
--- a/components/fpspreadsheet/wikitable.pas
+++ b/components/fpspreadsheet/source/common/wikitable.pas
@@ -110,7 +110,7 @@ var
implementation
uses
- fpsStrings, fpsXMLCommon, fpsRegFileFormats;
+ fpsStrings, fpsXMLCommon;
{ TWikiTableTokenizer }
diff --git a/components/fpspreadsheet/xlsbiff2.pas b/components/fpspreadsheet/source/common/xlsbiff2.pas
old mode 100755
new mode 100644
similarity index 99%
rename from components/fpspreadsheet/xlsbiff2.pas
rename to components/fpspreadsheet/source/common/xlsbiff2.pas
index ddf89c802..58cc9e0d4
--- a/components/fpspreadsheet/xlsbiff2.pas
+++ b/components/fpspreadsheet/source/common/xlsbiff2.pas
@@ -168,7 +168,7 @@ implementation
uses
Math,
- fpsStrings, fpsRegFileFormats, fpsPalette, fpsNumFormat;
+ fpsStrings, fpsReaderWriter, fpsPalette, fpsNumFormat;
const
{ Excel record IDs }
@@ -370,7 +370,7 @@ end;
procedure TsSpreadBIFF2Reader.ReadColumnDefault(AStream: TStream);
var
c, col1, col2: Word;
- attr1, attr2, attr3: Byte;
+ attr2, attr3: Byte;
fmt: TsCellFormat;
fmtIndex: Integer;
fontIndex: Integer;
@@ -386,7 +386,7 @@ begin
col2 := WordLEToN(AStream.ReadWord) - 1;
{ Attributes }
- attr1 := AStream.ReadByte;
+ {attr1 := }AStream.ReadByte; // Avoid compiler warning of unused attr1
attr2 := AStream.ReadByte;
attr3 := AStream.ReadByte;
diff --git a/components/fpspreadsheet/xlsbiff5.pas b/components/fpspreadsheet/source/common/xlsbiff5.pas
old mode 100755
new mode 100644
similarity index 99%
rename from components/fpspreadsheet/xlsbiff5.pas
rename to components/fpspreadsheet/source/common/xlsbiff5.pas
index 54469fc3c..650a9ccc1
--- a/components/fpspreadsheet/xlsbiff5.pas
+++ b/components/fpspreadsheet/source/common/xlsbiff5.pas
@@ -217,7 +217,7 @@ implementation
uses
Math,
- fpsStrings, fpsRegFileFormats, fpsStreams, fpsPalette, fpsNumFormat, xlsconst;
+ fpsStrings, fpsReaderWriter, fpsStreams, fpsPalette, fpsNumFormat, xlsconst;
const
{ Excel record IDs }
diff --git a/components/fpspreadsheet/xlsbiff8.pas b/components/fpspreadsheet/source/common/xlsbiff8.pas
old mode 100755
new mode 100644
similarity index 99%
rename from components/fpspreadsheet/xlsbiff8.pas
rename to components/fpspreadsheet/source/common/xlsbiff8.pas
index 63388dc9b..4af64b3d6
--- a/components/fpspreadsheet/xlsbiff8.pas
+++ b/components/fpspreadsheet/source/common/xlsbiff8.pas
@@ -279,7 +279,7 @@ implementation
uses
Math, lconvencoding, LazFileUtils, URIParser,
- fpsStrings, fpsStreams, fpsRegFileFormats, fpsPalette,
+ fpsStrings, {%H-}fpsPatches, fpsStreams, fpsReaderWriter, fpsPalette,
fpsNumFormat, fpsExprParser, xlsEscher;
const
@@ -1941,7 +1941,10 @@ begin
AStream.ReadBuffer(wideStr[1], size);
// The buffer can be larger than the space occupied by the wideStr.
// --> Find true string length and convert wide string to utf-8.
- len := StrLen(PWideChar(widestr));
+
+// len := StrLen(PWideChar(widestr)); // wp: working fine except for Laz1.0
+ len := Length(widestr); // Is this ok?
+
SetLength(widestr, len);
link := UTF8Encode(widestr);
end else
diff --git a/components/fpspreadsheet/xlscommon.pas b/components/fpspreadsheet/source/common/xlscommon.pas
similarity index 99%
rename from components/fpspreadsheet/xlscommon.pas
rename to components/fpspreadsheet/source/common/xlscommon.pas
index 03af0e120..672a3b528 100644
--- a/components/fpspreadsheet/xlscommon.pas
+++ b/components/fpspreadsheet/source/common/xlscommon.pas
@@ -11,7 +11,7 @@ interface
uses
Classes, SysUtils, DateUtils, lconvencoding,
- fpsTypes, fpSpreadsheet, fpsUtils, fpsNumFormatParser, fpsPalette,
+ fpsTypes, fpSpreadsheet, fpsUtils, fpsNumFormat, fpsPalette,
fpsReaderWriter, fpsrpn;
const
@@ -633,8 +633,7 @@ implementation
uses
AVL_Tree, Math, Variants,
- {%H-}fpspatches, fpsStrings, fpsClasses, fpsNumFormat, xlsConst,
- //fpsrpn,
+ {%H-}fpspatches, fpsStrings, fpsClasses, xlsConst,
fpsExprParser, fpsPageLayout;
const
@@ -2119,8 +2118,6 @@ var
hasFormat: Boolean;
flags: DWord;
xf: Word;
- idx: Integer;
- fmt: PsCellFormat;
begin
rowrec.RowIndex := 0; // to silence the compiler...
AStream.ReadBuffer(rowrec, SizeOf(TRowRecord));
@@ -4397,7 +4394,7 @@ begin
dw := dw or $00000040; // Row height and font height do not match
if ARow^.FormatIndex > 0 then begin
dw := dw or $00000080; // Row has custom format
- dw := dw or (FindXFIndex(ARow^.FormatIndex) shl 16); // xf index
+ dw := dw or DWord(FindXFIndex(ARow^.FormatIndex) shl 16); // xf index
end;
{ Write out }
diff --git a/components/fpspreadsheet/xlsconst.pas b/components/fpspreadsheet/source/common/xlsconst.pas
similarity index 100%
rename from components/fpspreadsheet/xlsconst.pas
rename to components/fpspreadsheet/source/common/xlsconst.pas
diff --git a/components/fpspreadsheet/xlsescher.pas b/components/fpspreadsheet/source/common/xlsescher.pas
similarity index 100%
rename from components/fpspreadsheet/xlsescher.pas
rename to components/fpspreadsheet/source/common/xlsescher.pas
diff --git a/components/fpspreadsheet/xlsxml.pas b/components/fpspreadsheet/source/common/xlsxml.pas
similarity index 99%
rename from components/fpspreadsheet/xlsxml.pas
rename to components/fpspreadsheet/source/common/xlsxml.pas
index 805dd63cc..b2738ceeb 100644
--- a/components/fpspreadsheet/xlsxml.pas
+++ b/components/fpspreadsheet/source/common/xlsxml.pas
@@ -90,7 +90,7 @@ implementation
uses
StrUtils, Math,
- fpsStrings, fpsRegFileFormats, fpsUtils, fpsNumFormat, fpsXmlCommon, fpsHTMLUtils;
+ fpsStrings, fpsUtils, fpsNumFormat, fpsXmlCommon, fpsHTMLUtils;
const
FMT_OFFSET = 61;
diff --git a/components/fpspreadsheet/xlsxooxml.pas b/components/fpspreadsheet/source/common/xlsxooxml.pas
old mode 100755
new mode 100644
similarity index 99%
rename from components/fpspreadsheet/xlsxooxml.pas
rename to components/fpspreadsheet/source/common/xlsxooxml.pas
index a8b864893..f752afabc
--- a/components/fpspreadsheet/xlsxooxml.pas
+++ b/components/fpspreadsheet/source/common/xlsxooxml.pas
@@ -227,8 +227,7 @@ implementation
uses
variants, strutils, math, lazutf8, LazFileUtils, uriparser,
{%H-}fpsPatches,
- fpsStrings, fpsStreams, fpsNumFormatParser, fpsClasses, fpsImages,
- fpsRegFileFormats;
+ fpsStrings, fpsStreams, fpsClasses, fpsImages;
const
{ OOXML general XML constants }
@@ -1139,7 +1138,8 @@ begin
L.DelimitedText := GetNodeValue(node);
for j:=0 to L.Count-1 do
begin
- s := ReplaceStr(L[j], '''', '');
+ //s := ReplaceStr(L[j], '''', ''); // wp: replaced by next line because of Laz 1.0
+ s := StringReplace(L[j], '''', '', [rfReplaceAll]);
p := pos(':', s);
if p = 0 then
begin
@@ -1163,7 +1163,8 @@ begin
L.DelimitedText := GetNodeValue(node);
for j:=0 to L.Count-1 do
begin
- s := ReplaceStr(L[j], '''', '');
+ //s := ReplaceStr(L[j], '''', ''); // wp: replaced by next line due to Laz 1.0
+ s := StringReplace(L[j], '''', '', [rfReplaceAll]);
p := pos('!', s);
if p > 0 then s := Copy(s, p+1, MaxInt);
p := pos(':', s);
diff --git a/components/fpspreadsheet/fpsexport.pas b/components/fpspreadsheet/source/export/fpsexport.pas
similarity index 100%
rename from components/fpspreadsheet/fpsexport.pas
rename to components/fpspreadsheet/source/export/fpsexport.pas
diff --git a/components/fpspreadsheet/fpsexportreg.pas b/components/fpspreadsheet/source/export/fpsexportreg.pas
similarity index 100%
rename from components/fpspreadsheet/fpsexportreg.pas
rename to components/fpspreadsheet/source/export/fpsexportreg.pas
diff --git a/components/fpspreadsheet/fps.inc b/components/fpspreadsheet/source/fps.inc
similarity index 91%
rename from components/fpspreadsheet/fps.inc
rename to components/fpspreadsheet/source/fps.inc
index d2dfcae9c..d62374096 100644
--- a/components/fpspreadsheet/fps.inc
+++ b/components/fpspreadsheet/source/fps.inc
@@ -37,3 +37,8 @@
the package with older versions activate the define FPS_NO_GRID_MULTISELECT }
{.$DEFINE FPS_NO_GRID_MULTISELECT}
+{ In order to provide safe casting of integers to pointers new version of FPC
+ provide the types PtrInt and IntPtr.
+ This is not yet available in fpc 2.6.0 }
+{.$DEFINE FPS_PTRINT}
+
diff --git a/components/fpspreadsheet/source/install.txt b/components/fpspreadsheet/source/install.txt
new file mode 100644
index 000000000..da74d785c
--- /dev/null
+++ b/components/fpspreadsheet/source/install.txt
@@ -0,0 +1,3 @@
+(1) Open laz_fpspreadsheet.lpk --> compile
+(2) Open laz_fpspreadsheet_visual.lpk --> Usage --> Install
+(3) Open laz_fpspreadsheetexport_visual.lpk --> Usage --> Install
\ No newline at end of file
diff --git a/components/fpspreadsheet/laz_fpspreadsheet.lpk b/components/fpspreadsheet/source/laz_fpspreadsheet.lpk
similarity index 53%
rename from components/fpspreadsheet/laz_fpspreadsheet.lpk
rename to components/fpspreadsheet/source/laz_fpspreadsheet.lpk
index dbbd2bc93..a4be3be19 100644
--- a/components/fpspreadsheet/laz_fpspreadsheet.lpk
+++ b/components/fpspreadsheet/source/laz_fpspreadsheet.lpk
@@ -9,7 +9,8 @@
-
+
+
@@ -18,10 +19,11 @@
-
+
+
-
-
+
+
-
-
+
+
+
-
-
+
+
+
-
-
+
+
-
-
+
+
+
-
-
+
+
+
-
-
+
+
+
-
-
+
+
+
-
-
+
+
+
-
-
+
+
-
-
+
+
+
-
-
+
+
+
-
-
+
+
+
-
-
+
+
+
-
-
+
+
+
-
-
+
+
+
-
-
+
+
+
-
-
+
+
-
-
+
+
+
-
-
+
+
+
-
-
+
+
+
-
-
+
+
+
-
-
+
+
+
-
-
+
+
+
-
+
+
-
-
+
+
+
-
-
+
+
+
-
-
+
+
+
-
-
+
+
+
-
-
+
+
+
-
-
+
+
+
-
-
+
+
+
-
-
+
+
+
-
-
+
+
+
-
-
+
+
+
-
-
+
+
+
-
-
+
+
+
-
-
+
+
+
-
-
+
+
+
-
-
+
+
+
-
+
+
-
-
+
+
+
-
-
+
+
+
-
-
+
+
+
-
-
+
+
-
+
diff --git a/components/fpspreadsheet/laz_fpspreadsheet_visual.lpk b/components/fpspreadsheet/source/laz_fpspreadsheet_visual.lpk
similarity index 82%
rename from components/fpspreadsheet/laz_fpspreadsheet_visual.lpk
rename to components/fpspreadsheet/source/laz_fpspreadsheet_visual.lpk
index 883d28497..1caca7ae8 100644
--- a/components/fpspreadsheet/laz_fpspreadsheet_visual.lpk
+++ b/components/fpspreadsheet/source/laz_fpspreadsheet_visual.lpk
@@ -9,8 +9,8 @@
-
-
+
+
@@ -23,38 +23,37 @@ It provides graphical components like a grid and chart."/>
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
+
-
+
+
-
-
-
+
diff --git a/components/fpspreadsheet/laz_fpspreadsheetexport_visual.lpk b/components/fpspreadsheet/source/laz_fpspreadsheetexport_visual.lpk
similarity index 89%
rename from components/fpspreadsheet/laz_fpspreadsheetexport_visual.lpk
rename to components/fpspreadsheet/source/laz_fpspreadsheetexport_visual.lpk
index 9091a01c6..4f2931788 100644
--- a/components/fpspreadsheet/laz_fpspreadsheetexport_visual.lpk
+++ b/components/fpspreadsheet/source/laz_fpspreadsheetexport_visual.lpk
@@ -9,8 +9,8 @@
-
-
+
+
@@ -28,11 +28,11 @@ It provides a graphical export component on the Data Export tab."/>
-
+
-
+
diff --git a/components/fpspreadsheet/fpsactions.pas b/components/fpspreadsheet/source/visual/fpsactions.pas
similarity index 100%
rename from components/fpspreadsheet/fpsactions.pas
rename to components/fpspreadsheet/source/visual/fpsactions.pas
diff --git a/components/fpspreadsheet/fpspreadsheetchart.pas b/components/fpspreadsheet/source/visual/fpspreadsheetchart.pas
similarity index 100%
rename from components/fpspreadsheet/fpspreadsheetchart.pas
rename to components/fpspreadsheet/source/visual/fpspreadsheetchart.pas
diff --git a/components/fpspreadsheet/fpspreadsheetctrls.lrs b/components/fpspreadsheet/source/visual/fpspreadsheetctrls.lrs
similarity index 100%
rename from components/fpspreadsheet/fpspreadsheetctrls.lrs
rename to components/fpspreadsheet/source/visual/fpspreadsheetctrls.lrs
diff --git a/components/fpspreadsheet/fpspreadsheetctrls.pas b/components/fpspreadsheet/source/visual/fpspreadsheetctrls.pas
similarity index 99%
rename from components/fpspreadsheet/fpspreadsheetctrls.pas
rename to components/fpspreadsheet/source/visual/fpspreadsheetctrls.pas
index 76b601e31..1321109ab 100644
--- a/components/fpspreadsheet/fpspreadsheetctrls.pas
+++ b/components/fpspreadsheet/source/visual/fpspreadsheetctrls.pas
@@ -510,7 +510,7 @@ implementation
uses
Types, Math, StrUtils, TypInfo, LCLType, LCLIntf, LCLProc,
Dialogs, Forms, Clipbrd,
- fpsStrings, fpsRegFileFormats, fpsUtils, fpsNumFormat, fpsImages,
+ fpsStrings, fpsReaderWriter, fpsUtils, fpsNumFormat, fpsImages,
fpsHTMLUtils, fpsCSV;
var
@@ -2992,7 +2992,7 @@ begin
if AData <> nil then
FCurrRow := PCell(AData)^.Row;
end else if ([lniRow] * AChangedItems <> []) then
- FCurrRow := PtrInt(AData)
+ FCurrRow := {%H-}PtrInt(AData)
else
exit;
DoUpdate;
@@ -3003,7 +3003,7 @@ begin
if AData <> nil then
FCurrCol := PCell(AData)^.Col;
end else if ([lniCol] * AChangedItems <> []) then
- FCurrCol := PtrInt(AData)
+ FCurrCol := {%H-}PtrInt(AData)
else
exit;
DoUpdate;
@@ -3307,7 +3307,7 @@ var
begin
if (Workbook = nil) or (Worksheet = nil) then
exit;
- if (ACol < 0) or (ACol <> Worksheet.ActiveCellCol) then
+ if (ACol < 0) or (ACol <> Integer(Worksheet.ActiveCellCol)) then
exit;
unitStr := SizeUnitNames[Workbook.Units];
@@ -3349,7 +3349,7 @@ var
begin
if (Workbook = nil) or (Worksheet = nil) then
exit;
- if (ARow < 0) or (ARow <> Worksheet.ActiveCellRow) then
+ if (ARow < 0) or (ARow <> Integer(Worksheet.ActiveCellRow)) then
exit;
unitStr := SizeUnitNames[Workbook.Units];
diff --git a/components/fpspreadsheet/fpspreadsheetgrid.pas b/components/fpspreadsheet/source/visual/fpspreadsheetgrid.pas
similarity index 99%
rename from components/fpspreadsheet/fpspreadsheetgrid.pas
rename to components/fpspreadsheet/source/visual/fpspreadsheetgrid.pas
index da864cafd..395bdbd65 100644
--- a/components/fpspreadsheet/fpspreadsheetgrid.pas
+++ b/components/fpspreadsheet/source/visual/fpspreadsheetgrid.pas
@@ -13,7 +13,7 @@
unit fpspreadsheetgrid;
{$mode objfpc}{$H+}
-{$I fps.inc}
+{$I ..\fps.inc}
{ To do:
- When Lazarus 1.4 comes out remove the workaround for the RGB2HLS bug in
@@ -80,7 +80,6 @@ type
FDefColWidth100: Integer; // Default col width for 100% zoom factor, in pixels
FZoomLock: Integer;
FRowHeightLock: Integer;
- FOldTopRow: Integer;
FOnClickHyperlink: TsHyperlinkClickEvent;
function CalcAutoRowHeight(ARow: Integer): Integer;
function CalcColWidthFromSheet(AWidth: Single): Integer;
@@ -729,7 +728,7 @@ implementation
uses
Types, LCLType, LCLIntf, LCLProc, Math, StrUtils,
- fpCanvas,
+ fpCanvas, {%H-}fpsPatches,
fpsStrings, fpsUtils, fpsVisualUtils, fpsHTMLUtils,
fpsNumFormat;
@@ -992,8 +991,6 @@ end;
@param AOwner Owner of the grid
-------------------------------------------------------------------------------}
constructor TsCustomWorksheetGrid.Create(AOwner: TComponent);
-var
- i: Integer;
begin
inc(FRowHeightLock);
@@ -1691,7 +1688,6 @@ var
fmt: PsCellFormat;
r, c: Integer;
fnt: TsFont;
- style: TFontStyles;
isSelected: Boolean;
fgcolor, bgcolor: TColor;
// numFmt: TsNumFormatParams;
@@ -4116,7 +4112,7 @@ begin
gcol := GetGridCol(cell^.Col);
AutoExpandToRow(grow, aeData);
AutoExpandToCol(gcol, aeData);
- lRow := Worksheet.FindRow(srow);
+ lRow := Worksheet.FindRow(cell^.Row);
if (lRow = nil) or (lRow^.RowHeightType <> rhtCustom) then
UpdateRowHeight(grow, true);
end;
@@ -4155,7 +4151,7 @@ begin
// Column width
if (lniCol in AChangedItems) and (Worksheet <> nil) then
begin
- scol := {%Hä}PtrInt(AData); // sheet column index
+ scol := {%H-}PtrInt(AData); // sheet column index
gcol := GetGridCol(scol);
//lCol := Worksheet.FindCol(scol);
UpdateColWidth(gcol);
@@ -4483,8 +4479,6 @@ end;
initial column widths and row heights.
-------------------------------------------------------------------------------}
procedure TsCustomWorksheetGrid.Setup;
-var
- nc, nr: Integer;
begin
if csLoading in ComponentState then
exit;
@@ -4507,8 +4501,6 @@ begin
end;
end else
if Worksheet <> nil then begin
- nc := ColCount;
- nr := RowCount;
if FHeaderCount = 0 then
begin
ColCount := Max(GetGridCol(Worksheet.GetLastColIndex), ColCount-1);
diff --git a/components/fpspreadsheet/fpsvisualutils.pas b/components/fpspreadsheet/source/visual/fpsvisualutils.pas
similarity index 100%
rename from components/fpspreadsheet/fpsvisualutils.pas
rename to components/fpspreadsheet/source/visual/fpsvisualutils.pas
diff --git a/components/fpspreadsheet/tests/numformatparsertests.pas b/components/fpspreadsheet/tests/numformatparsertests.pas
index d1f38eb90..63d06e5a9 100644
--- a/components/fpspreadsheet/tests/numformatparsertests.pas
+++ b/components/fpspreadsheet/tests/numformatparsertests.pas
@@ -8,7 +8,7 @@ uses
// Not using Lazarus package as the user may be working with multiple versions
// Instead, add .. to unit search path
Classes, SysUtils, fpcunit, testregistry,
- fpstypes, fpspreadsheet, fpsnumformatparser
+ fpstypes, fpspreadsheet, fpsnumformat
{and a project requirement for lclbase for utf8 handling},
testsutility;
diff --git a/components/fpspreadsheet/tests/spreadtestcli.lpi b/components/fpspreadsheet/tests/spreadtestcli.lpi
index 786a929b6..fd92d685f 100644
--- a/components/fpspreadsheet/tests/spreadtestcli.lpi
+++ b/components/fpspreadsheet/tests/spreadtestcli.lpi
@@ -17,9 +17,6 @@
-
-
-
@@ -180,7 +177,7 @@
-
+
diff --git a/components/fpspreadsheet/tests/spreadtestgui.lpi b/components/fpspreadsheet/tests/spreadtestgui.lpi
index 14a5c9ebc..a20e1acbf 100644
--- a/components/fpspreadsheet/tests/spreadtestgui.lpi
+++ b/components/fpspreadsheet/tests/spreadtestgui.lpi
@@ -153,7 +153,7 @@
-
+