fpspreadsheet: Add support for frozen panes in BIFF5/BIFF8 (BIFF2 not working at the moment), fpSpreadsheetGrid, and BIFFExplorer.

git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3005 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
wp_xxyyzz
2014-05-04 18:07:54 +00:00
parent 211fdb666f
commit 482eac242a
14 changed files with 956 additions and 564 deletions

View File

@ -31,6 +31,12 @@ begin
//MyWorksheet.WriteColWidth(0, 5); //MyWorksheet.WriteColWidth(0, 5);
//MyWorksheet.WriteColWidth(1, 30); //MyWorksheet.WriteColWidth(1, 30);
{ -- currently not working
MyWorksheet.Options := MyWorksheet.Options + [soHasFrozenPanes];
MyWorksheet.LeftPaneWidth := 1;
MyWorksheet.TopPaneHeight := 2;
}
// Write some number cells // Write some number cells
MyWorksheet.WriteNumber(0, 0, 1.0); MyWorksheet.WriteNumber(0, 0, 1.0);
MyWorksheet.WriteUsedFormatting(0, 0, [uffBold, uffNumberFormat]); MyWorksheet.WriteUsedFormatting(0, 0, [uffBold, uffNumberFormat]);

View File

@ -34,6 +34,13 @@ begin
MyWorkbook := TsWorkbook.Create; MyWorkbook := TsWorkbook.Create;
MyWorksheet := MyWorkbook.AddWorksheet(Str_Worksheet1); MyWorksheet := MyWorkbook.AddWorksheet(Str_Worksheet1);
MyWorksheet.Options := MyWorksheet.Options + [soHasFrozenPanes];
MyWorksheet.LeftPaneWidth := 1;
MyWorksheet.TopPaneHeight := 2;
{ unfrozen panes not working at the moment
MyWorksheet.LeftPaneWidth := 20*72*2; // 72 pt = inch --> 2 inches = 5 cm }
MyWorkbook.AddFont('Calibri', 20, [], scRed); MyWorkbook.AddFont('Calibri', 20, [], scRed);
// Write some cells // Write some cells

View File

@ -40,7 +40,15 @@ begin
MyWorkbook.UsePalette(@PALETTE_BIFF8, Length(PALETTE_BIFF8)); MyWorkbook.UsePalette(@PALETTE_BIFF8, Length(PALETTE_BIFF8));
MyWorksheet := MyWorkbook.AddWorksheet(Str_Worksheet1); MyWorksheet := MyWorkbook.AddWorksheet(Str_Worksheet1);
MyWorksheet.ShowGridLines := false; MyWorksheet.Options := MyWorksheet.Options - [soShowGridLines];
MyWorksheet.Options := MyWorksheet.Options + [soHasFrozenPanes];
myWorksheet.LeftPaneWidth := 1;
MyWorksheet.TopPaneHeight := 2;
{ non-frozen panes not working, at the moment. Require SELECTION records?
MyWorksheet.LeftPaneWidth := 20*72*2; // 72 pt = inch --> 2 inches = 5 cm
}
// Write some cells // Write some cells
MyWorksheet.WriteNumber(0, 0, 1.0);// A1 MyWorksheet.WriteNumber(0, 0, 1.0);// A1

View File

@ -117,7 +117,7 @@
<WindowIndex Value="0"/> <WindowIndex Value="0"/>
<TopLine Value="1"/> <TopLine Value="1"/>
<CursorPos X="10" Y="7"/> <CursorPos X="10" Y="7"/>
<UsageCount Value="128"/> <UsageCount Value="139"/>
<Loaded Value="True"/> <Loaded Value="True"/>
</Unit0> </Unit0>
<Unit1> <Unit1>
@ -130,9 +130,9 @@
<IsVisibleTab Value="True"/> <IsVisibleTab Value="True"/>
<EditorIndex Value="1"/> <EditorIndex Value="1"/>
<WindowIndex Value="0"/> <WindowIndex Value="0"/>
<TopLine Value="69"/> <TopLine Value="140"/>
<CursorPos X="51" Y="85"/> <CursorPos X="41" Y="152"/>
<UsageCount Value="128"/> <UsageCount Value="139"/>
<Loaded Value="True"/> <Loaded Value="True"/>
<LoadedDesigner Value="True"/> <LoadedDesigner Value="True"/>
</Unit1> </Unit1>
@ -141,9 +141,9 @@
<UnitName Value="fpspreadsheet"/> <UnitName Value="fpspreadsheet"/>
<EditorIndex Value="8"/> <EditorIndex Value="8"/>
<WindowIndex Value="0"/> <WindowIndex Value="0"/>
<TopLine Value="378"/> <TopLine Value="297"/>
<CursorPos X="64" Y="392"/> <CursorPos X="57" Y="305"/>
<UsageCount Value="61"/> <UsageCount Value="66"/>
<Loaded Value="True"/> <Loaded Value="True"/>
</Unit2> </Unit2>
<Unit3> <Unit3>
@ -151,9 +151,9 @@
<UnitName Value="fpspreadsheetgrid"/> <UnitName Value="fpspreadsheetgrid"/>
<EditorIndex Value="3"/> <EditorIndex Value="3"/>
<WindowIndex Value="0"/> <WindowIndex Value="0"/>
<TopLine Value="37"/> <TopLine Value="877"/>
<CursorPos X="28" Y="68"/> <CursorPos X="25" Y="893"/>
<UsageCount Value="62"/> <UsageCount Value="67"/>
<Loaded Value="True"/> <Loaded Value="True"/>
</Unit3> </Unit3>
<Unit4> <Unit4>
@ -162,7 +162,7 @@
<WindowIndex Value="0"/> <WindowIndex Value="0"/>
<TopLine Value="25"/> <TopLine Value="25"/>
<CursorPos X="4" Y="44"/> <CursorPos X="4" Y="44"/>
<UsageCount Value="3"/> <UsageCount Value="2"/>
</Unit4> </Unit4>
<Unit5> <Unit5>
<Filename Value="c:\lazarus27\fpc\2.2.4\source\packages\winunits-base\src\activex.pp"/> <Filename Value="c:\lazarus27\fpc\2.2.4\source\packages\winunits-base\src\activex.pp"/>
@ -170,7 +170,7 @@
<WindowIndex Value="0"/> <WindowIndex Value="0"/>
<TopLine Value="49"/> <TopLine Value="49"/>
<CursorPos X="10" Y="24"/> <CursorPos X="10" Y="24"/>
<UsageCount Value="3"/> <UsageCount Value="2"/>
</Unit5> </Unit5>
<Unit6> <Unit6>
<Filename Value="c:\lazarus27\fpc\2.2.4\source\packages\fcl-base\src\avl_tree.pp"/> <Filename Value="c:\lazarus27\fpc\2.2.4\source\packages\fcl-base\src\avl_tree.pp"/>
@ -178,7 +178,7 @@
<WindowIndex Value="0"/> <WindowIndex Value="0"/>
<TopLine Value="37"/> <TopLine Value="37"/>
<CursorPos X="14" Y="83"/> <CursorPos X="14" Y="83"/>
<UsageCount Value="3"/> <UsageCount Value="2"/>
</Unit6> </Unit6>
<Unit7> <Unit7>
<Filename Value="c:\Lazarus\lcl\grids.pas"/> <Filename Value="c:\Lazarus\lcl\grids.pas"/>
@ -186,14 +186,14 @@
<WindowIndex Value="0"/> <WindowIndex Value="0"/>
<TopLine Value="1516"/> <TopLine Value="1516"/>
<CursorPos X="28" Y="1534"/> <CursorPos X="28" Y="1534"/>
<UsageCount Value="3"/> <UsageCount Value="2"/>
</Unit7> </Unit7>
<Unit8> <Unit8>
<Filename Value="c:\Lazarus\lcl\include\customform.inc"/> <Filename Value="c:\Lazarus\lcl\include\customform.inc"/>
<WindowIndex Value="0"/> <WindowIndex Value="0"/>
<TopLine Value="2021"/> <TopLine Value="2021"/>
<CursorPos X="1" Y="2041"/> <CursorPos X="1" Y="2041"/>
<UsageCount Value="3"/> <UsageCount Value="2"/>
</Unit8> </Unit8>
<Unit9> <Unit9>
<Filename Value="..\..\fpsallformats.pas"/> <Filename Value="..\..\fpsallformats.pas"/>
@ -201,7 +201,7 @@
<WindowIndex Value="0"/> <WindowIndex Value="0"/>
<TopLine Value="1"/> <TopLine Value="1"/>
<CursorPos X="62" Y="13"/> <CursorPos X="62" Y="13"/>
<UsageCount Value="13"/> <UsageCount Value="12"/>
</Unit9> </Unit9>
<Unit10> <Unit10>
<Filename Value="..\..\wikitable.pas"/> <Filename Value="..\..\wikitable.pas"/>
@ -209,7 +209,7 @@
<WindowIndex Value="0"/> <WindowIndex Value="0"/>
<TopLine Value="48"/> <TopLine Value="48"/>
<CursorPos X="41" Y="60"/> <CursorPos X="41" Y="60"/>
<UsageCount Value="19"/> <UsageCount Value="18"/>
</Unit10> </Unit10>
<Unit11> <Unit11>
<Filename Value="..\..\fpsopendocument.pas"/> <Filename Value="..\..\fpsopendocument.pas"/>
@ -217,16 +217,19 @@
<WindowIndex Value="0"/> <WindowIndex Value="0"/>
<TopLine Value="1"/> <TopLine Value="1"/>
<CursorPos X="1" Y="1"/> <CursorPos X="1" Y="1"/>
<UsageCount Value="15"/> <UsageCount Value="14"/>
</Unit11> </Unit11>
<Unit12> <Unit12>
<Filename Value="d:\lazarus-svn\lcl\grids.pas"/> <Filename Value="d:\lazarus-svn\lcl\grids.pas"/>
<UnitName Value="Grids"/> <UnitName Value="Grids"/>
<EditorIndex Value="4"/> <EditorIndex Value="4"/>
<WindowIndex Value="0"/> <WindowIndex Value="0"/>
<TopLine Value="2622"/> <TopLine Value="3915"/>
<CursorPos X="1" Y="2648"/> <CursorPos X="1" Y="3924"/>
<UsageCount Value="24"/> <UsageCount Value="29"/>
<Bookmarks Count="1">
<Item0 X="7" Y="3905" ID="1"/>
</Bookmarks>
<Loaded Value="True"/> <Loaded Value="True"/>
</Unit12> </Unit12>
<Unit13> <Unit13>
@ -236,7 +239,7 @@
<WindowIndex Value="0"/> <WindowIndex Value="0"/>
<TopLine Value="35"/> <TopLine Value="35"/>
<CursorPos X="1" Y="62"/> <CursorPos X="1" Y="62"/>
<UsageCount Value="37"/> <UsageCount Value="42"/>
<Loaded Value="True"/> <Loaded Value="True"/>
</Unit13> </Unit13>
<Unit14> <Unit14>
@ -244,7 +247,7 @@
<WindowIndex Value="0"/> <WindowIndex Value="0"/>
<TopLine Value="1212"/> <TopLine Value="1212"/>
<CursorPos X="3" Y="1218"/> <CursorPos X="3" Y="1218"/>
<UsageCount Value="11"/> <UsageCount Value="10"/>
</Unit14> </Unit14>
<Unit15> <Unit15>
<Filename Value="d:\lazarus-svn\lcl\graphics.pp"/> <Filename Value="d:\lazarus-svn\lcl\graphics.pp"/>
@ -253,7 +256,7 @@
<WindowIndex Value="0"/> <WindowIndex Value="0"/>
<TopLine Value="649"/> <TopLine Value="649"/>
<CursorPos X="28" Y="675"/> <CursorPos X="28" Y="675"/>
<UsageCount Value="28"/> <UsageCount Value="33"/>
<Loaded Value="True"/> <Loaded Value="True"/>
</Unit15> </Unit15>
<Unit16> <Unit16>
@ -261,16 +264,16 @@
<WindowIndex Value="0"/> <WindowIndex Value="0"/>
<TopLine Value="248"/> <TopLine Value="248"/>
<CursorPos X="22" Y="263"/> <CursorPos X="22" Y="263"/>
<UsageCount Value="19"/> <UsageCount Value="18"/>
</Unit16> </Unit16>
<Unit17> <Unit17>
<Filename Value="..\..\xlsbiff8.pas"/> <Filename Value="..\..\xlsbiff8.pas"/>
<UnitName Value="xlsbiff8"/> <UnitName Value="xlsbiff8"/>
<EditorIndex Value="10"/> <EditorIndex Value="10"/>
<WindowIndex Value="0"/> <WindowIndex Value="0"/>
<TopLine Value="1568"/> <TopLine Value="1174"/>
<CursorPos X="38" Y="1594"/> <CursorPos X="1" Y="1198"/>
<UsageCount Value="36"/> <UsageCount Value="41"/>
<Loaded Value="True"/> <Loaded Value="True"/>
</Unit17> </Unit17>
<Unit18> <Unit18>
@ -279,23 +282,23 @@
<WindowIndex Value="0"/> <WindowIndex Value="0"/>
<TopLine Value="537"/> <TopLine Value="537"/>
<CursorPos X="23" Y="567"/> <CursorPos X="23" Y="567"/>
<UsageCount Value="7"/> <UsageCount Value="6"/>
</Unit18> </Unit18>
<Unit19> <Unit19>
<Filename Value="d:\lazarus-svn\lcl\include\wincontrol.inc"/> <Filename Value="d:\lazarus-svn\lcl\include\wincontrol.inc"/>
<WindowIndex Value="0"/> <WindowIndex Value="0"/>
<TopLine Value="7344"/> <TopLine Value="7344"/>
<CursorPos X="30" Y="7349"/> <CursorPos X="30" Y="7349"/>
<UsageCount Value="13"/> <UsageCount Value="12"/>
</Unit19> </Unit19>
<Unit20> <Unit20>
<Filename Value="..\..\xlscommon.pas"/> <Filename Value="..\..\xlscommon.pas"/>
<UnitName Value="xlscommon"/> <UnitName Value="xlscommon"/>
<EditorIndex Value="9"/> <EditorIndex Value="9"/>
<WindowIndex Value="0"/> <WindowIndex Value="0"/>
<TopLine Value="850"/> <TopLine Value="914"/>
<CursorPos X="41" Y="862"/> <CursorPos X="1" Y="942"/>
<UsageCount Value="32"/> <UsageCount Value="37"/>
<Loaded Value="True"/> <Loaded Value="True"/>
</Unit20> </Unit20>
<Unit21> <Unit21>
@ -303,9 +306,9 @@
<UnitName Value="xlsbiff5"/> <UnitName Value="xlsbiff5"/>
<EditorIndex Value="11"/> <EditorIndex Value="11"/>
<WindowIndex Value="0"/> <WindowIndex Value="0"/>
<TopLine Value="300"/> <TopLine Value="1319"/>
<CursorPos X="40" Y="310"/> <CursorPos X="3" Y="1325"/>
<UsageCount Value="19"/> <UsageCount Value="24"/>
<Loaded Value="True"/> <Loaded Value="True"/>
</Unit21> </Unit21>
<Unit22> <Unit22>
@ -313,9 +316,9 @@
<UnitName Value="xlsbiff2"/> <UnitName Value="xlsbiff2"/>
<EditorIndex Value="12"/> <EditorIndex Value="12"/>
<WindowIndex Value="0"/> <WindowIndex Value="0"/>
<TopLine Value="136"/> <TopLine Value="399"/>
<CursorPos X="3" Y="153"/> <CursorPos X="16" Y="406"/>
<UsageCount Value="20"/> <UsageCount Value="25"/>
<Loaded Value="True"/> <Loaded Value="True"/>
</Unit22> </Unit22>
<Unit23> <Unit23>
@ -324,7 +327,7 @@
<WindowIndex Value="0"/> <WindowIndex Value="0"/>
<TopLine Value="841"/> <TopLine Value="841"/>
<CursorPos X="19" Y="852"/> <CursorPos X="19" Y="852"/>
<UsageCount Value="8"/> <UsageCount Value="7"/>
</Unit23> </Unit23>
<Unit24> <Unit24>
<Filename Value="d:\lazarus-svn\fpc\2.6.2\source\packages\fcl-image\src\fpcanvas.pp"/> <Filename Value="d:\lazarus-svn\fpc\2.6.2\source\packages\fcl-image\src\fpcanvas.pp"/>
@ -333,7 +336,7 @@
<WindowIndex Value="0"/> <WindowIndex Value="0"/>
<TopLine Value="111"/> <TopLine Value="111"/>
<CursorPos X="3" Y="112"/> <CursorPos X="3" Y="112"/>
<UsageCount Value="15"/> <UsageCount Value="20"/>
<Loaded Value="True"/> <Loaded Value="True"/>
</Unit24> </Unit24>
<Unit25> <Unit25>
@ -342,14 +345,14 @@
<WindowIndex Value="0"/> <WindowIndex Value="0"/>
<TopLine Value="74"/> <TopLine Value="74"/>
<CursorPos X="3" Y="93"/> <CursorPos X="3" Y="93"/>
<UsageCount Value="9"/> <UsageCount Value="8"/>
</Unit25> </Unit25>
<Unit26> <Unit26>
<Filename Value="d:\lazarus-svn\fpc\2.6.2\source\rtl\objpas\classes\lists.inc"/> <Filename Value="d:\lazarus-svn\fpc\2.6.2\source\rtl\objpas\classes\lists.inc"/>
<WindowIndex Value="0"/> <WindowIndex Value="0"/>
<TopLine Value="141"/> <TopLine Value="141"/>
<CursorPos X="3" Y="143"/> <CursorPos X="3" Y="143"/>
<UsageCount Value="17"/> <UsageCount Value="16"/>
</Unit26> </Unit26>
<Unit27> <Unit27>
<Filename Value="d:\Prog_Delphi\common\units\XLS.pas"/> <Filename Value="d:\Prog_Delphi\common\units\XLS.pas"/>
@ -358,7 +361,7 @@
<WindowIndex Value="0"/> <WindowIndex Value="0"/>
<TopLine Value="114"/> <TopLine Value="114"/>
<CursorPos X="42" Y="152"/> <CursorPos X="42" Y="152"/>
<UsageCount Value="11"/> <UsageCount Value="16"/>
<Loaded Value="True"/> <Loaded Value="True"/>
</Unit27> </Unit27>
<Unit28> <Unit28>
@ -367,130 +370,130 @@
<WindowIndex Value="0"/> <WindowIndex Value="0"/>
<TopLine Value="272"/> <TopLine Value="272"/>
<CursorPos X="3" Y="286"/> <CursorPos X="3" Y="286"/>
<UsageCount Value="11"/> <UsageCount Value="16"/>
<Loaded Value="True"/> <Loaded Value="True"/>
</Unit28> </Unit28>
</Units> </Units>
<JumpHistory Count="30" HistoryIndex="29"> <JumpHistory Count="30" HistoryIndex="29">
<Position1> <Position1>
<Filename Value="..\..\fpspreadsheetgrid.pas"/> <Filename Value="..\..\xlsbiff5.pas"/>
<Caret Line="58" Column="20" TopLine="58"/> <Caret Line="1347" Column="26" TopLine="1332"/>
</Position1> </Position1>
<Position2> <Position2>
<Filename Value="..\..\fpspreadsheetgrid.pas"/> <Filename Value="..\..\xlsbiff8.pas"/>
<Caret Line="1" Column="1" TopLine="1"/> <Caret Line="1578" Column="26" TopLine="1568"/>
</Position2> </Position2>
<Position3> <Position3>
<Filename Value="..\..\fpspreadsheetgrid.pas"/> <Filename Value="..\..\fpspreadsheetgrid.pas"/>
<Caret Line="290" Column="24" TopLine="263"/> <Caret Line="438" Column="33" TopLine="419"/>
</Position3> </Position3>
<Position4> <Position4>
<Filename Value="..\..\fpspreadsheetgrid.pas"/> <Filename Value="..\..\fpspreadsheetgrid.pas"/>
<Caret Line="331" Column="29" TopLine="304"/> <Caret Line="892" Column="57" TopLine="876"/>
</Position4> </Position4>
<Position5> <Position5>
<Filename Value="..\..\fpspreadsheetgrid.pas"/> <Filename Value="..\..\fpspreadsheetgrid.pas"/>
<Caret Line="450" Column="36" TopLine="423"/> <Caret Line="898" Column="23" TopLine="886"/>
</Position5> </Position5>
<Position6> <Position6>
<Filename Value="..\..\fpspreadsheetgrid.pas"/> <Filename Value="mainform.pas"/>
<Caret Line="496" Column="24" TopLine="468"/> <Caret Line="161" Column="1" TopLine="145"/>
</Position6> </Position6>
<Position7> <Position7>
<Filename Value="..\..\fpspreadsheetgrid.pas"/> <Filename Value="mainform.pas"/>
<Caret Line="651" Column="49" TopLine="624"/> <Caret Line="158" Column="46" TopLine="140"/>
</Position7> </Position7>
<Position8> <Position8>
<Filename Value="..\..\fpspreadsheetgrid.pas"/> <Filename Value="..\..\xlsbiff5.pas"/>
<Caret Line="710" Column="15" TopLine="681"/> <Caret Line="272" Column="15" TopLine="256"/>
</Position8> </Position8>
<Position9> <Position9>
<Filename Value="..\..\fpspreadsheetgrid.pas"/> <Filename Value="..\..\xlsbiff5.pas"/>
<Caret Line="720" Column="29" TopLine="693"/> <Caret Line="1" Column="1" TopLine="1"/>
</Position9> </Position9>
<Position10> <Position10>
<Filename Value="..\..\fpspreadsheetgrid.pas"/> <Filename Value="..\..\xlsbiff5.pas"/>
<Caret Line="800" Column="50" TopLine="800"/> <Caret Line="31" Column="8" TopLine="4"/>
</Position10> </Position10>
<Position11> <Position11>
<Filename Value="..\..\fpspreadsheetgrid.pas"/> <Filename Value="..\..\xlsbiff2.pas"/>
<Caret Line="1" Column="1" TopLine="1"/> <Caret Line="400" Column="48" TopLine="400"/>
</Position11> </Position11>
<Position12> <Position12>
<Filename Value="..\..\fpspreadsheetgrid.pas"/> <Filename Value="..\..\xlsbiff5.pas"/>
<Caret Line="441" Column="19" TopLine="415"/> <Caret Line="997" Column="54" TopLine="997"/>
</Position12> </Position12>
<Position13> <Position13>
<Filename Value="..\..\fpspreadsheetgrid.pas"/> <Filename Value="..\..\xlsbiff5.pas"/>
<Caret Line="776" Column="16" TopLine="749"/> <Caret Line="1004" Column="43" TopLine="997"/>
</Position13> </Position13>
<Position14> <Position14>
<Filename Value="..\..\fpspreadsheetgrid.pas"/> <Filename Value="..\..\xlsbiff5.pas"/>
<Caret Line="780" Column="16" TopLine="753"/> <Caret Line="1010" Column="50" TopLine="997"/>
</Position14> </Position14>
<Position15> <Position15>
<Filename Value="..\..\fpspreadsheetgrid.pas"/> <Filename Value="..\..\xlsbiff5.pas"/>
<Caret Line="789" Column="14" TopLine="762"/> <Caret Line="1015" Column="17" TopLine="997"/>
</Position15> </Position15>
<Position16> <Position16>
<Filename Value="..\..\fpspreadsheetgrid.pas"/> <Filename Value="..\..\xlsbiff5.pas"/>
<Caret Line="803" Column="14" TopLine="777"/> <Caret Line="1016" Column="17" TopLine="997"/>
</Position16> </Position16>
<Position17> <Position17>
<Filename Value="..\..\fpspreadsheetgrid.pas"/> <Filename Value="..\..\xlsbiff5.pas"/>
<Caret Line="318" Column="17" TopLine="302"/> <Caret Line="1017" Column="17" TopLine="997"/>
</Position17> </Position17>
<Position18> <Position18>
<Filename Value="..\..\fpspreadsheetgrid.pas"/> <Filename Value="..\..\xlsbiff5.pas"/>
<Caret Line="499" Column="19" TopLine="484"/> <Caret Line="1018" Column="17" TopLine="997"/>
</Position18> </Position18>
<Position19> <Position19>
<Filename Value="..\..\fpspreadsheetgrid.pas"/> <Filename Value="..\..\xlsbiff5.pas"/>
<Caret Line="776" Column="16" TopLine="749"/> <Caret Line="1021" Column="39" TopLine="997"/>
</Position19> </Position19>
<Position20> <Position20>
<Filename Value="..\..\fpspreadsheetgrid.pas"/> <Filename Value="..\..\xlsbiff5.pas"/>
<Caret Line="780" Column="16" TopLine="753"/> <Caret Line="1023" Column="39" TopLine="997"/>
</Position20> </Position20>
<Position21> <Position21>
<Filename Value="..\..\fpspreadsheetgrid.pas"/> <Filename Value="..\..\xlsbiff5.pas"/>
<Caret Line="789" Column="14" TopLine="762"/> <Caret Line="1025" Column="39" TopLine="998"/>
</Position21> </Position21>
<Position22> <Position22>
<Filename Value="..\..\fpspreadsheetgrid.pas"/> <Filename Value="..\..\xlsbiff5.pas"/>
<Caret Line="836" Column="7" TopLine="832"/> <Caret Line="1027" Column="39" TopLine="1000"/>
</Position22> </Position22>
<Position23> <Position23>
<Filename Value="..\..\fpspreadsheetgrid.pas"/> <Filename Value="..\..\xlsbiff5.pas"/>
<Caret Line="837" Column="43" TopLine="832"/> <Caret Line="1346" Column="25" TopLine="1319"/>
</Position23> </Position23>
<Position24> <Position24>
<Filename Value="mainform.pas"/> <Filename Value="..\..\xlsbiff2.pas"/>
<Caret Line="140" Column="18" TopLine="131"/> <Caret Line="66" Column="15" TopLine="50"/>
</Position24> </Position24>
<Position25> <Position25>
<Filename Value="mainform.pas"/> <Filename Value="..\..\xlsbiff5.pas"/>
<Caret Line="104" Column="17" TopLine="77"/> <Caret Line="1346" Column="33" TopLine="1319"/>
</Position25> </Position25>
<Position26> <Position26>
<Filename Value="mainform.pas"/> <Filename Value="..\..\xlsbiff5.pas"/>
<Caret Line="139" Column="16" TopLine="129"/> <Caret Line="1325" Column="3" TopLine="1319"/>
</Position26> </Position26>
<Position27> <Position27>
<Filename Value="mainform.pas"/> <Filename Value="..\..\xlsbiff2.pas"/>
<Caret Line="80" Column="30" TopLine="78"/> <Caret Line="588" Column="1" TopLine="562"/>
</Position27> </Position27>
<Position28> <Position28>
<Filename Value="..\..\fpspreadsheetgrid.pas"/> <Filename Value="..\..\xlsbiff2.pas"/>
<Caret Line="65" Column="14" TopLine="40"/> <Caret Line="1435" Column="5" TopLine="1435"/>
</Position28> </Position28>
<Position29> <Position29>
<Filename Value="..\..\fpspreadsheetgrid.pas"/> <Filename Value="..\..\xlsbiff2.pas"/>
<Caret Line="858" Column="24" TopLine="845"/> <Caret Line="1" Column="1" TopLine="1"/>
</Position29> </Position29>
<Position30> <Position30>
<Filename Value="mainform.pas"/> <Filename Value="..\..\xlsbiff2.pas"/>
<Caret Line="85" Column="19" TopLine="69"/> <Caret Line="63" Column="22" TopLine="36"/>
</Position30> </Position30>
</JumpHistory> </JumpHistory>
</ProjectOptions> </ProjectOptions>
@ -526,7 +529,7 @@
<WatchScope Value="wpsLocal"/> <WatchScope Value="wpsLocal"/>
<WatchKind Value="wpkWrite"/> <WatchKind Value="wpkWrite"/>
<Source Value="..\..\xlsbiff2.pas"/> <Source Value="..\..\xlsbiff2.pas"/>
<Line Value="553"/> <Line Value="556"/>
</Item1> </Item1>
</BreakPoints> </BreakPoints>
<Watches Count="2"> <Watches Count="2">

View File

@ -1,10 +1,10 @@
object Form1: TForm1 object Form1: TForm1
Left = 370 Left = 370
Height = 379 Height = 386
Top = 258 Top = 258
Width = 518 Width = 518
Caption = 'fpsGrid' Caption = 'fpsGrid'
ClientHeight = 359 ClientHeight = 366
ClientWidth = 518 ClientWidth = 518
Menu = MainMenu1 Menu = MainMenu1
OnActivate = FormActivate OnActivate = FormActivate
@ -12,12 +12,12 @@ object Form1: TForm1
LCLVersion = '1.3' LCLVersion = '1.3'
object Panel1: TPanel object Panel1: TPanel
Left = 0 Left = 0
Height = 55 Height = 70
Top = 304 Top = 296
Width = 518 Width = 518
Align = alBottom Align = alBottom
BevelOuter = bvNone BevelOuter = bvNone
ClientHeight = 55 ClientHeight = 70
ClientWidth = 518 ClientWidth = 518
TabOrder = 0 TabOrder = 0
object btnPopulateGrid: TButton object btnPopulateGrid: TButton
@ -52,10 +52,44 @@ object Form1: TForm1
State = cbChecked State = cbChecked
TabOrder = 2 TabOrder = 2
end end
object EdFrozenCols: TSpinEdit
Left = 208
Height = 23
Top = 8
Width = 52
OnChange = EdFrozenColsChange
TabOrder = 3
end
object EdFrozenRows: TSpinEdit
Left = 208
Height = 23
Top = 36
Width = 52
OnChange = EdFrozenRowsChange
TabOrder = 4
end
object Label1: TLabel
Left = 135
Height = 15
Top = 13
Width = 62
Caption = 'Frozen cols:'
FocusControl = EdFrozenCols
ParentColor = False
end
object Label2: TLabel
Left = 136
Height = 15
Top = 39
Width = 66
Caption = 'Frozen rows:'
FocusControl = EdFrozenRows
ParentColor = False
end
end end
object PageControl1: TPageControl object PageControl1: TPageControl
Left = 0 Left = 0
Height = 278 Height = 270
Top = 26 Top = 26
Width = 518 Width = 518
ActivePage = TabSheet1 ActivePage = TabSheet1
@ -65,15 +99,15 @@ object Form1: TForm1
OnChange = PageControl1Change OnChange = PageControl1Change
object TabSheet1: TTabSheet object TabSheet1: TTabSheet
Caption = 'Sheet1' Caption = 'Sheet1'
ClientHeight = 250 ClientHeight = 242
ClientWidth = 510 ClientWidth = 510
object sWorksheetGrid1: TsWorksheetGrid object sWorksheetGrid1: TsWorksheetGrid
Left = 0 Left = 0
Height = 250 Height = 242
Top = 0 Top = 0
Width = 510 Width = 510
Align = alClient Align = alClient
Options = [goFixedVertLine, goFixedHorzLine, goVertLine, goHorzLine, goRangeSelect, goRowSizing, goColSizing, goThumbTracking, goSmoothScroll] Options = [goFixedVertLine, goFixedHorzLine, goVertLine, goHorzLine, goRangeSelect, goRowSizing, goColSizing, goThumbTracking, goSmoothScroll, goFixedColSizing]
TabOrder = 0 TabOrder = 0
TitleStyle = tsNative TitleStyle = tsNative
end end

View File

@ -1,348 +1,356 @@
{ This is an automatically generated lazarus resource file } { This is an automatically generated lazarus resource file }
LazarusResources.Add('TForm1','FORMDATA',[ LazarusResources.Add('TForm1','FORMDATA',[
'TPF0'#6'TForm1'#5'Form1'#4'Left'#3'r'#1#6'Height'#3'{'#1#3'Top'#3#2#1#5'Widt' 'TPF0'#6'TForm1'#5'Form1'#4'Left'#3'r'#1#6'Height'#3#130#1#3'Top'#3#2#1#5'Wid'
+'h'#3#6#2#7'Caption'#6#7'fpsGrid'#12'ClientHeight'#3'g'#1#11'ClientWidth'#3#6 +'th'#3#6#2#7'Caption'#6#7'fpsGrid'#12'ClientHeight'#3'n'#1#11'ClientWidth'#3
+#2#4'Menu'#7#9'MainMenu1'#10'OnActivate'#7#12'FormActivate'#8'ShowHint'#9#10 +#6#2#4'Menu'#7#9'MainMenu1'#10'OnActivate'#7#12'FormActivate'#8'ShowHint'#9
+'LCLVersion'#6#3'1.3'#0#6'TPanel'#6'Panel1'#4'Left'#2#0#6'Height'#2'7'#3'Top' +#10'LCLVersion'#6#3'1.3'#0#6'TPanel'#6'Panel1'#4'Left'#2#0#6'Height'#2'F'#3
+#3'0'#1#5'Width'#3#6#2#5'Align'#7#8'alBottom'#10'BevelOuter'#7#6'bvNone'#12 +'Top'#3'('#1#5'Width'#3#6#2#5'Align'#7#8'alBottom'#10'BevelOuter'#7#6'bvNone'
+'ClientHeight'#2'7'#11'ClientWidth'#3#6#2#8'TabOrder'#2#0#0#7'TButton'#15'bt' +#12'ClientHeight'#2'F'#11'ClientWidth'#3#6#2#8'TabOrder'#2#0#0#7'TButton'#15
+'nPopulateGrid'#4'Left'#3#144#1#6'Height'#2#25#3'Top'#2#13#5'Width'#2'p'#7'C' +'btnPopulateGrid'#4'Left'#3#144#1#6'Height'#2#25#3'Top'#2#13#5'Width'#2'p'#7
+'aption'#6#13'Populate Grid'#7'OnClick'#7#20'btnPopulateGridClick'#8'TabOrde' +'Caption'#6#13'Populate Grid'#7'OnClick'#7#20'btnPopulateGridClick'#8'TabOrd'
+'r'#2#0#7'Visible'#8#0#0#9'TCheckBox'#13'CbShowHeaders'#4'Left'#2#8#6'Height' +'er'#2#0#7'Visible'#8#0#0#9'TCheckBox'#13'CbShowHeaders'#4'Left'#2#8#6'Heigh'
+#2#19#3'Top'#2#8#5'Width'#2']'#7'Caption'#6#12'Show headers'#7'Checked'#9#7 +'t'#2#19#3'Top'#2#8#5'Width'#2']'#7'Caption'#6#12'Show headers'#7'Checked'#9
+'OnClick'#7#18'CbShowHeadersClick'#5'State'#7#9'cbChecked'#8'TabOrder'#2#1#0 +#7'OnClick'#7#18'CbShowHeadersClick'#5'State'#7#9'cbChecked'#8'TabOrder'#2#1
+#0#9'TCheckBox'#15'CbShowGridLines'#4'Left'#2#8#6'Height'#2#19#3'Top'#2#29#5 +#0#0#9'TCheckBox'#15'CbShowGridLines'#4'Left'#2#8#6'Height'#2#19#3'Top'#2#29
+'Width'#2'd'#7'Caption'#6#15'Show grid lines'#7'Checked'#9#7'OnClick'#7#20'C' +#5'Width'#2'd'#7'Caption'#6#15'Show grid lines'#7'Checked'#9#7'OnClick'#7#20
+'bShowGridLinesClick'#5'State'#7#9'cbChecked'#8'TabOrder'#2#2#0#0#0#12'TPage' +'CbShowGridLinesClick'#5'State'#7#9'cbChecked'#8'TabOrder'#2#2#0#0#9'TSpinEd'
+'Control'#12'PageControl1'#4'Left'#2#0#6'Height'#3#22#1#3'Top'#2#26#5'Width' +'it'#12'EdFrozenCols'#4'Left'#3#208#0#6'Height'#2#23#3'Top'#2#8#5'Width'#2'4'
+#3#6#2#10'ActivePage'#7#9'TabSheet1'#5'Align'#7#8'alClient'#8'TabIndex'#2#0#8 +#8'OnChange'#7#18'EdFrozenColsChange'#8'TabOrder'#2#3#0#0#9'TSpinEdit'#12'Ed'
+'TabOrder'#2#1#8'OnChange'#7#18'PageControl1Change'#0#9'TTabSheet'#9'TabShee' +'FrozenRows'#4'Left'#3#208#0#6'Height'#2#23#3'Top'#2'$'#5'Width'#2'4'#8'OnCh'
+'t1'#7'Caption'#6#6'Sheet1'#12'ClientHeight'#3#250#0#11'ClientWidth'#3#254#1 +'ange'#7#18'EdFrozenRowsChange'#8'TabOrder'#2#4#0#0#6'TLabel'#6'Label1'#4'Le'
+#0#15'TsWorksheetGrid'#15'sWorksheetGrid1'#4'Left'#2#0#6'Height'#3#250#0#3'T' +'ft'#3#135#0#6'Height'#2#15#3'Top'#2#13#5'Width'#2'>'#7'Caption'#6#12'Frozen'
+'op'#2#0#5'Width'#3#254#1#5'Align'#7#8'alClient'#7'Options'#11#15'goFixedVer' +' cols:'#12'FocusControl'#7#12'EdFrozenCols'#11'ParentColor'#8#0#0#6'TLabel'
+'tLine'#15'goFixedHorzLine'#10'goVertLine'#10'goHorzLine'#13'goRangeSelect' +#6'Label2'#4'Left'#3#136#0#6'Height'#2#15#3'Top'#2''''#5'Width'#2'B'#7'Capti'
+#11'goRowSizing'#11'goColSizing'#15'goThumbTracking'#14'goSmoothScroll'#0#8 +'on'#6#12'Frozen rows:'#12'FocusControl'#7#12'EdFrozenRows'#11'ParentColor'#8
+'TabOrder'#2#0#10'TitleStyle'#7#8'tsNative'#0#0#0#0#8'TToolBar'#8'ToolBar1'#4 +#0#0#0#12'TPageControl'#12'PageControl1'#4'Left'#2#0#6'Height'#3#14#1#3'Top'
+'Left'#2#0#6'Height'#2#26#3'Top'#2#0#5'Width'#3#6#2#12'ButtonHeight'#2#24#7 +#2#26#5'Width'#3#6#2#10'ActivePage'#7#9'TabSheet1'#5'Align'#7#8'alClient'#8
+'Caption'#6#8'ToolBar1'#11'EdgeBorders'#11#0#6'Images'#7#10'ImageList1'#8'Ta' +'TabIndex'#2#0#8'TabOrder'#2#1#8'OnChange'#7#18'PageControl1Change'#0#9'TTab'
+'bOrder'#2#2#0#11'TToolButton'#11'ToolButton1'#4'Left'#2#1#3'Top'#2#0#6'Acti' +'Sheet'#9'TabSheet1'#7'Caption'#6#6'Sheet1'#12'ClientHeight'#3#242#0#11'Clie'
+'on'#7#6'AcOpen'#0#0#11'TToolButton'#11'ToolButton2'#4'Left'#2#24#3'Top'#2#0 +'ntWidth'#3#254#1#0#15'TsWorksheetGrid'#15'sWorksheetGrid1'#4'Left'#2#0#6'He'
+#6'Action'#7#8'AcSaveAs'#0#0#11'TToolButton'#11'ToolButton3'#4'Left'#2'4'#3 +'ight'#3#242#0#3'Top'#2#0#5'Width'#3#254#1#5'Align'#7#8'alClient'#7'Options'
+'Top'#2#0#6'Action'#7#6'AcQuit'#0#0#11'TToolButton'#11'ToolButton5'#4'Left'#2 +#11#15'goFixedVertLine'#15'goFixedHorzLine'#10'goVertLine'#10'goHorzLine'#13
+'/'#3'Top'#2#0#5'Width'#2#5#7'Caption'#6#11'ToolButton5'#5'Style'#7#10'tbsDi' +'goRangeSelect'#11'goRowSizing'#11'goColSizing'#15'goThumbTracking'#14'goSmo'
+'vider'#0#0#0#11'TOpenDialog'#11'OpenDialog1'#10'DefaultExt'#6#4'.xls'#6'Fil' +'othScroll'#16'goFixedColSizing'#0#8'TabOrder'#2#0#10'TitleStyle'#7#8'tsNati'
+'ter'#6#192'Excel spreadsheet (*.xls)|*.xls|Excel XML spreadsheet (*.xlsx)|*' +'ve'#0#0#0#0#8'TToolBar'#8'ToolBar1'#4'Left'#2#0#6'Height'#2#26#3'Top'#2#0#5
+'.xlxs|LibreOffice/OpenOffice spreadsheet (*.ods)|*.ods|Wikitable (pipes) (.' +'Width'#3#6#2#12'ButtonHeight'#2#24#7'Caption'#6#8'ToolBar1'#11'EdgeBorders'
+'wikitable_pipes)|.wikitable_pipes|All files (*.*)|*.*'#7'Options'#11#20'ofE' +#11#0#6'Images'#7#10'ImageList1'#8'TabOrder'#2#2#0#11'TToolButton'#11'ToolBu'
+'xtensionDifferent'#14'ofEnableSizing'#12'ofViewDetail'#0#4'left'#2'@'#3'top' +'tton1'#4'Left'#2#1#3'Top'#2#0#6'Action'#7#6'AcOpen'#0#0#11'TToolButton'#11
+#3#176#0#0#0#11'TSaveDialog'#11'SaveDialog1'#10'DefaultExt'#6#4'.xls'#6'Filt' +'ToolButton2'#4'Left'#2#24#3'Top'#2#0#6'Action'#7#8'AcSaveAs'#0#0#11'TToolBu'
+'er'#6#185'Excel spreadsheet (*.xls)|*.xls|Excel XML spreadsheet (*.xlsx)|*.' +'tton'#11'ToolButton3'#4'Left'#2'4'#3'Top'#2#0#6'Action'#7#6'AcQuit'#0#0#11
+'xlsx|LibreOffice/OpenOffice spreadsheet (*.ods)|*.ods|Wikitable (wikimedia)' +'TToolButton'#11'ToolButton5'#4'Left'#2'/'#3'Top'#2#0#5'Width'#2#5#7'Caption'
+' (.wikitable_wikimedia)|*.wikitable_wikimedia'#7'Options'#11#20'ofExtension' +#6#11'ToolButton5'#5'Style'#7#10'tbsDivider'#0#0#0#11'TOpenDialog'#11'OpenDi'
+'Different'#14'ofEnableSizing'#12'ofViewDetail'#0#4'left'#3#176#0#3'top'#3 +'alog1'#10'DefaultExt'#6#4'.xls'#6'Filter'#6#192'Excel spreadsheet (*.xls)|*'
+#176#0#0#0#9'TMainMenu'#9'MainMenu1'#6'Images'#7#10'ImageList1'#4'left'#3' ' +'.xls|Excel XML spreadsheet (*.xlsx)|*.xlxs|LibreOffice/OpenOffice spreadshe'
+#1#3'top'#3#176#0#0#9'TMenuItem'#7'mnuFile'#7'Caption'#6#5'&File'#0#9'TMenuI' +'et (*.ods)|*.ods|Wikitable (pipes) (.wikitable_pipes)|.wikitable_pipes|All '
+'tem'#7'mnuOpen'#6'Action'#7#6'AcOpen'#11'Bitmap.Data'#10':'#4#0#0'6'#4#0#0 +'files (*.*)|*.*'#7'Options'#11#20'ofExtensionDifferent'#14'ofEnableSizing'
+'BM6'#4#0#0#0#0#0#0'6'#0#0#0'('#0#0#0#16#0#0#0#16#0#0#0#1#0' '#0#0#0#0#0#0#4 +#12'ofViewDetail'#0#4'left'#2'@'#3'top'#3#176#0#0#0#11'TSaveDialog'#11'SaveD'
+#0#0'd'#0#0#0'd'#0#0#0#0#0#0#0#0#0#0#0','#134#216#0'-'#136#216#247'-'#135#216 +'ialog1'#10'DefaultExt'#6#4'.xls'#6'Filter'#6#185'Excel spreadsheet (*.xls)|'
+#247'-'#136#216#247'-'#136#216#247'-'#136#216#247'-'#136#216#247'-'#136#216 +'*.xls|Excel XML spreadsheet (*.xlsx)|*.xlsx|LibreOffice/OpenOffice spreadsh'
+#247'-'#136#216#247'-'#136#216#247'-'#136#216#247'-'#135#216#247'-'#136#216 +'eet (*.ods)|*.ods|Wikitable (wikimedia) (.wikitable_wikimedia)|*.wikitable_'
+#247','#134#216#0#255#255#255#0#255#255#255#0'3'#142#217#251#220#240#250#255 +'wikimedia'#7'Options'#11#20'ofExtensionDifferent'#14'ofEnableSizing'#12'ofV'
+#152#225#246#255#149#224#246#255#146#223#246#255#142#222#245#255#137#220#245 +'iewDetail'#0#4'left'#3#176#0#3'top'#3#176#0#0#0#9'TMainMenu'#9'MainMenu1'#6
+#255#133#218#244#255#128#217#244#255'z'#215#243#255't'#213#243#255'p'#211#242 +'Images'#7#10'ImageList1'#4'left'#3' '#1#3'top'#3#176#0#0#9'TMenuItem'#7'mnu'
+#255#194#234#248#255'5'#148#218#255#255#255#255#0#255#255#255#0'5'#148#218 +'File'#7'Caption'#6#5'&File'#0#9'TMenuItem'#7'mnuOpen'#6'Action'#7#6'AcOpen'
+#247#239#250#254#255#147#229#248#255#143#228#248#255#137#227#248#255#130#225 +#11'Bitmap.Data'#10':'#4#0#0'6'#4#0#0'BM6'#4#0#0#0#0#0#0'6'#0#0#0'('#0#0#0#16
+#247#255'z'#223#247#255'q'#222#246#255'g'#219#245#255'['#216#244#255'M'#212 +#0#0#0#16#0#0#0#1#0' '#0#0#0#0#0#0#4#0#0'd'#0#0#0'd'#0#0#0#0#0#0#0#0#0#0#0','
+#243#255'@'#209#242#255#202#242#251#255'5'#148#218#255#255#255#255#0#255#255 +#134#216#0'-'#136#216#247'-'#135#216#247'-'#136#216#247'-'#136#216#247'-'#136
+#255#0'6'#154#218#248#242#250#253#255#148#230#248#255#146#229#248#255#144#229 +#216#247'-'#136#216#247'-'#136#216#247'-'#136#216#247'-'#136#216#247'-'#136
+#248#255#139#227#248#255#134#226#247#255#127#225#247#255'w'#222#246#255'l' +#216#247'-'#135#216#247'-'#136#216#247','#134#216#0#255#255#255#0#255#255#255
+#220#246#255'^'#217#244#255'O'#213#243#255#204#242#251#255'5'#148#218#255#255 +#0'3'#142#217#251#220#240#250#255#152#225#246#255#149#224#246#255#146#223#246
+#255#255#0#255#255#255#0'6'#161#218#249#246#252#254#255#148#229#248#255#147 +#255#142#222#245#255#137#220#245#255#133#218#244#255#128#217#244#255'z'#215
+#229#248#255#147#229#248#255#145#229#248#255#147#219#233#255#147#215#227#255 +#243#255't'#213#243#255'p'#211#242#255#194#234#248#255'5'#148#218#255#255#255
+#147#210#220#255#144#206#215#255#140#200#207#255#134#193#198#255#201#216#214 +#255#0#255#255#255#0'5'#148#218#247#239#250#254#255#147#229#248#255#143#228
+#255'5'#148#218#255#197'tD'#232#202#127'S'#241'7'#166#218#250#254#255#255#255 +#248#255#137#227#248#255#130#225#247#255'z'#223#247#255'q'#222#246#255'g'#219
+#248#253#255#255#246#253#255#255#245#252#255#255#243#252#254#255#154#228#244 +#245#255'['#216#244#255'M'#212#243#255'@'#209#242#255#202#242#251#255'5'#148
+#255#154#230#247#255#155#230#246#255#157#229#245#255#158#229#245#255#159#229 +#218#255#255#255#255#0#255#255#255#0'6'#154#218#248#242#250#253#255#148#230
+#244#255#218#243#248#255'5'#148#218#255#253#244#238#255#202#128'T'#249'5'#171 +#248#255#146#229#248#255#144#229#248#255#139#227#248#255#134#226#247#255#127
,#218#250#232#246#251#255'p'#188#231#255'U'#170#226#255'M'#165#224#255#145#201 ,#225#247#255'w'#222#246#255'l'#220#246#255'^'#217#244#255'O'#213#243#255#204
+#235#255#250#243#239#255#253#254#253#255#255#253#252#255#255#253#252#255#254 +#242#251#255'5'#148#218#255#255#255#255#0#255#255#255#0'6'#161#218#249#246
+#253#252#255#254#252#251#255#254#254#253#255'5'#148#218#255#239#242#232#255 +#252#254#255#148#229#248#255#147#229#248#255#147#229#248#255#145#229#248#255
+#206#129'V'#255'6'#170#218#242#241#250#253#255#148#222#245#255#147#220#244 +#147#219#233#255#147#215#227#255#147#210#220#255#144#206#215#255#140#200#207
+#255'd'#188#233#255'5'#148#218#255'5'#148#218#255'5'#148#218#255'5'#148#218 +#255#134#193#198#255#201#216#214#255'5'#148#218#255#197'tD'#232#202#127'S'
+#255'5'#148#218#255'5'#148#218#255'5'#148#218#255'5'#148#218#255'5'#148#218 +#241'7'#166#218#250#254#255#255#255#248#253#255#255#246#253#255#255#245#252
+#255#251#246#239#255#204#131'U'#254'5'#175#218#240#247#252#254#255#142#228 +#255#255#243#252#254#255#154#228#244#255#154#230#247#255#155#230#246#255#157
+#248#255#145#222#245#255#159#224#245#255#172#225#246#255#202#132'R'#255#255 +#229#245#255#158#229#245#255#159#229#244#255#218#243#248#255'5'#148#218#255
+#247#241#255#255#233#217#255#255#234#219#255#255#233#217#255#255#231#215#255 +#253#244#238#255#202#128'T'#249'5'#171#218#250#232#246#251#255'p'#188#231#255
+#255#229#210#255#255#226#203#255#255#247#241#255#203#133'U'#254'6'#179#218 +'U'#170#226#255'M'#165#224#255#145#201#235#255#250#243#239#255#253#254#253
+#248#253#254#254#255#254#255#255#255#254#254#255#255#253#254#255#255#254#255 +#255#255#253#252#255#255#253#252#255#254#253#252#255#254#252#251#255#254#254
+#255#255#228#186#145#255#255#247#240#255#255#231#213#255#253#231#214#255#253 +#253#255'5'#148#218#255#239#242#232#255#206#129'V'#255'6'#170#218#242#241#250
+#230#212#255#252#228#208#255#251#227#203#255#250#220#194#255#254#243#232#255 +#253#255#148#222#245#255#147#220#244#255'd'#188#233#255'5'#148#218#255'5'#148
+#204#134'V'#254'4'#180#217#208'^'#194#225#250'`'#195#226#250'`'#195#226#250 +#218#255'5'#148#218#255'5'#148#218#255'5'#148#218#255'5'#148#218#255'5'#148
+'`'#195#226#250'_'#195#226#250#228#187#145#255#255#247#242#255#254#231#213 +#218#255'5'#148#218#255'5'#148#218#255#251#246#239#255#204#131'U'#254'5'#175
+#255#254#231#213#255#253#229#209#255#250#224#202#255#249#222#196#255#247#217 +#218#240#247#252#254#255#142#228#248#255#145#222#245#255#159#224#245#255#172
+#188#255#253#242#231#255#204#135'W'#254#255#255#255#0#255#255#255#0#255#255 +#225#246#255#202#132'R'#255#255#247#241#255#255#233#217#255#255#234#219#255
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0#228#187#146#255#254#247#241 +#255#233#217#255#255#231#215#255#255#229#210#255#255#226#203#255#255#247#241
+#255#252#229#210#255#252#228#209#255#251#226#204#255#249#221#196#255#246#215 +#255#203#133'U'#254'6'#179#218#248#253#254#254#255#254#255#255#255#254#254
+#187#255#243#209#175#255#250#239#228#255#204#135'X'#254#255#255#255#0#255#255 +#255#255#253#254#255#255#254#255#255#255#228#186#145#255#255#247#240#255#255
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#228#187#146 +#231#213#255#253#231#214#255#253#230#212#255#252#228#208#255#251#227#203#255
+#255#254#246#240#255#252#226#205#255#252#227#205#255#250#223#200#255#247#217 +#250#220#194#255#254#243#232#255#204#134'V'#254'4'#180#217#208'^'#194#225#250
+#188#255#245#233#221#255#250#243#235#255#251#248#243#255#202#131'S'#254#255 +'`'#195#226#250'`'#195#226#250'`'#195#226#250'_'#195#226#250#228#187#145#255
+#255#247#242#255#254#231#213#255#254#231#213#255#253#229#209#255#250#224#202
+#255#249#222#196#255#247#217#188#255#253#242#231#255#204#135'W'#254#255#255
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
+#228#187#146#255#254#247#241#255#252#229#210#255#252#228#209#255#251#226#204
+#255#249#221#196#255#246#215#187#255#243#209#175#255#250#239#228#255#204#135
+'X'#254#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0#228#187#146#255#254#246#240#255#252#226#205#255#252#227#205
+#255#250#223#200#255#247#217#188#255#245#233#221#255#250#243#235#255#251#248
+#243#255#202#131'S'#254#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255
+#0#255#255#255#0#255#255#255#0#228#187#147#255#254#245#237#255#252#222#197
+#255#251#224#199#255#249#220#194#255#245#211#180#255#254#249#243#255#250#226
+#196#255#236#193#147#255#195'}H'#147#255#255#255#0#255#255#255#0#255#255#255
+#0#255#255#255#0#255#255#255#0#255#255#255#0#229#190#150#255#255#255#254#255
+#253#243#233#255#253#243#234#255#252#242#232#255#250#239#227#255#250#242#231
+#255#234#187#136#255#207#133'U'#179#180'i='#12#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#234#195#157#255#230
+#191#150#255#228#187#146#255#228#187#146#255#209#160'l'#245#208#158'm'#246
+#204#150'_'#218#196'yB~'#178'g<'#9#255#255#255#0#7'OnClick'#7#13'acOpenExecu'
+'te'#0#0#9'TMenuItem'#9'mnuSaveAs'#6'Action'#7#8'AcSaveAs'#11'Bitmap.Data'#10
+':'#4#0#0'6'#4#0#0'BM6'#4#0#0#0#0#0#0'6'#0#0#0'('#0#0#0#16#0#0#0#16#0#0#0#1#0
+' '#0#0#0#0#0#0#4#0#0'd'#0#0#0'd'#0#0#0#0#0#0#0#0#0#0#0#186'j6'#0#185'i5'#181
+#184'i5'#238#183'h5'#255#181'h5'#255#180'g4'#255#178'f4'#255#176'e3'#255#174
+'d3'#255#172'c2'#255#170'b2'#255#169'a2'#255#168'`1'#255#167'`1'#254#166'`1'
+#241#168'a1'#196#186'j5'#222#235#198#173#255#234#197#173#255#254#251#248#255
+#254#251#248#255#254#251#248#255#254#251#248#255#254#251#248#255#254#251#248
+#255#254#251#248#255#254#251#248#255#254#251#248#255#254#251#248#255#200#154
+'|'#255#199#152'y'#255#167'`1'#237#186'k7'#254#237#202#179#255#224#162'z'#255
+#254#250#247#255'b'#192#136#255'b'#192#136#255'b'#192#136#255'b'#192#136#255
+'b'#192#136#255'b'#192#136#255'b'#192#136#255'b'#192#136#255#253#249#246#255
+#202#141'e'#255#201#155'|'#255#167'`1'#254#187'l8'#255#238#204#182#255#225
+#162'z'#255#254#250#247#255#191#220#194#255#191#220#194#255#191#220#194#255
+#191#220#194#255#191#220#194#255#191#220#194#255#191#220#194#255#191#220#194
+#255#253#249#246#255#205#144'h'#255#204#158#129#255#168'a2'#255#187'k8'#255
+#239#206#184#255#225#162'y'#255#254#250#247#255'b'#192#136#255'b'#192#136#255
+'b'#192#136#255'b'#192#136#255'b'#192#136#255'b'#192#136#255'b'#192#136#255
+'b'#192#136#255#253#249#246#255#207#147'j'#255#206#163#132#255#170'a2'#255
+#186'j6'#255#239#208#187#255#226#162'z'#255#254#251#248#255#254#251#248#255
+#254#251#248#255#254#251#248#255#254#251#248#255#254#251#248#255#254#251#248
+#255#254#251#248#255#254#251#248#255#254#251#248#255#211#150'm'#255#210#167
+#138#255#171'b2'#255#187'j6'#255#240#210#190#255#226#163'z'#255#226#163'z'
+#255#225#163'z'#255#226#163'{'#255#225#163'{'#255#224#161'x'#255#222#159'w'
,#255#221#159'v'#255#220#157't'#255#217#155'r'#255#216#153'q'#255#214#153'p'
+#255#213#171#142#255#173'c3'#255#187'j6'#255#242#213#194#255#227#163'z'#255
+#227#163'z'#255#226#163'{'#255#226#163'{'#255#226#164'{'#255#225#162'y'#255
+#224#161'x'#255#222#160'w'#255#222#158'u'#255#220#157't'#255#218#155's'#255
+#217#155's'#255#218#176#149#255#175'd3'#255#187'j6'#255#242#216#197#255#227
+#164'{'#255#227#163'z'#255#227#164'z'#255#226#164'{'#255#226#163'{'#255#225
+#163'{'#255#225#162'y'#255#223#160'w'#255#222#159'v'#255#221#158't'#255#219
+#156'r'#255#220#157't'#255#221#181#154#255#177'e4'#255#187'k6'#255#244#217
+#199#255#230#166'}'#255#200#140'd'#255#201#141'e'#255#201#142'g'#255#203#146
+'l'#255#203#146'm'#255#202#144'i'#255#200#140'e'#255#200#140'd'#255#200#140
+'d'#255#200#140'd'#255#218#156't'#255#225#186#159#255#179'f4'#255#187'k6'#254
+#244#220#201#255#231#167'}'#255#249#236#225#255#249#236#225#255#249#237#227
+#255#252#244#238#255#253#250#247#255#253#247#243#255#250#237#229#255#247#231
+#219#255#247#229#217#255#246#229#216#255#222#160'w'#255#228#190#164#255#180
+'g4'#255#188'k6'#250#245#221#204#255#231#168'~'#255#250#240#232#255#250#240
+#232#255#201#141'f'#255#250#240#233#255#253#248#243#255#254#250#248#255#252
+#244#239#255#249#233#223#255#247#231#219#255#247#229#217#255#224#162'x'#255
+#231#194#169#255#182'h5'#255#188'k6'#240#246#223#208#255#232#168'~'#255#252
+#246#241#255#252#246#241#255#200#140'd'#255#250#241#233#255#251#244#238#255
+#253#250#247#255#253#249#246#255#250#240#232#255#248#232#221#255#247#230#219
+#255#225#163'z'#255#239#213#195#255#183'i5'#254#188'k6'#216#246#223#209#255
+#233#170#128#255#254#250#246#255#253#250#246#255#200#140'd'#255#251#243#238
+#255#251#241#234#255#252#246#242#255#254#251#248#255#252#246#241#255#249#236
+#226#255#248#231#219#255#238#208#186#255#236#208#189#255#187'p>'#248#188'k6'
+#155#246#224#209#255#247#224#209#255#254#251#248#255#254#251#247#255#253#249
+#246#255#252#245#240#255#250#240#234#255#251#242#237#255#253#249#246#255#253
+#250#247#255#251#241#235#255#248#233#223#254#236#208#189#251#201#137'^'#236
+#181'i5c'#188'k6q'#188'k6'#144#188'k6'#204#188'k6'#238#188'k6'#250#187'k6'
+#254#187'k6'#255#187'j6'#255#187'j6'#255#188'l9'#255#189'n;'#255#187'm:'#255
+#187'k8'#239#187'p>'#203#182'i5T'#255#255#255#0#7'OnClick'#7#15'acSaveAsExec'
+'ute'#0#0#9'TMenuItem'#9'MenuItem1'#7'Caption'#6#1'-'#0#0#9'TMenuItem'#7'mnu'
+'Quit'#6'Action'#7#6'AcQuit'#11'Bitmap.Data'#10':'#4#0#0'6'#4#0#0'BM6'#4#0#0
+#0#0#0#0'6'#0#0#0'('#0#0#0#16#0#0#0#16#0#0#0#1#0' '#0#0#0#0#0#0#4#0#0'd'#0#0
+#0'd'#0#0#0#0#0#0#0#0#0#0#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
+#29'c'#155#22#25'`'#152'9'#20']'#149'b'#16'Z'#146#136#13'X'#144#164#19'\'#146
+#252#12'W'#143#237#153#153#153#255'qqq'#255'TTT'#255'QQQ'#255'OOO'#255'LLL'
+#255'JJJ'#255'GGG'#255'EEE'#255'%g'#157#255'2t'#168#255'=|'#175#255'G'#132
+#181#255'N'#138#186#255'>~'#173#255#12'W'#143#234#255#255#255#0#255#255#255#0
+'XXX'#255#162#162#162#255#162#162#162#255#163#163#163#255#164#164#164#255#164
+#164#164#255#165#165#165#255'/o'#165#255'x'#171#210#255'x'#171#211#255's'#167
+#209#255'i'#160#205#255'@'#127#174#255#15'Y'#145#234#255#255#255#0#255#255
+#255#0'\\\'#255#161#161#161#255'<s@'#255#160#161#161#255#163#163#163#255#163
+#163#163#255#164#164#164#255'6t'#170#255'}'#175#212#255'['#154#201#255'T'#149
+#199#255'X'#150#200#255'A'#128#174#255#19'\'#148#234#255#255#255#0#255#255
+#255#0'```'#255#160#160#160#255'=vA'#255'6q9'#255#162#162#162#255#162#162#162
+#255#163#163#163#255'=y'#176#255#130#179#215#255'b'#159#204#255'Z'#154#201
+#255'^'#155#202#255'C'#129#175#255#25'`'#152#234'7'#130'>'#255'4~;'#255'1y7'
+#255'.u4'#255'I'#145'P'#255'F'#143'L'#255'9s='#255#161#161#161#255#162#162
+#162#255'E~'#180#255#136#183#217#255'g'#163#207#255'a'#158#204#255'c'#159#204
+#255'E'#131#177#255#31'd'#156#234';'#135'B'#255#137#203#146#255#132#200#141
+#255#128#198#136#255'{'#195#131#255'w'#193#127#255'G'#143'M'#255';t?'#255#161
+#161#161#255'L'#132#186#255#141#187#219#255'n'#168#209#255'f'#166#209#255'_'
+#180#223#255'G'#133#177#255'%i'#161#234'>'#139'F'#255#143#206#153#255'}'#198
+#135#255'x'#195#129#255's'#192'|'#255't'#192'|'#255'y'#194#129#255'I'#144'O'
+#255'T'#127'W'#255'T'#137#191#255#148#191#221#255'u'#173#212#255'c'#184#225
+#255'K'#212#255#255'B'#139#184#255',n'#166#234'A'#144'J'#255#148#210#159#255
+#145#208#154#255#141#205#150#255#137#203#146#255#132#200#141#255'Q'#152'X'
+#255'A|F'#255#159#159#159#255'Z'#142#196#255#152#195#224#255'|'#179#215#255
+'t'#175#214#255'^'#196#237#255'K'#136#179#255'4s'#171#234'D'#148'M'#255'B'
+#145'K'#255'?'#141'H'#255'='#137'E'#255']'#164'e'#255'Z'#160'a'#255'E'#131'K'
+#255#158#158#158#255#158#158#158#255'`'#146#201#255#158#199#226#255#131#184
+#218#255'}'#180#215#255'~'#179#215#255'O'#137#180#255';y'#177#234#255#255#255
+#0#255#255#255#0'www'#255#154#154#154#255'='#138'E'#255'I'#138'O'#255#156#156
,#156#255#157#157#157#255#157#157#157#255'f'#150#204#255#162#203#227#255#137
+#189#220#255#131#185#218#255#132#185#218#255'Q'#139#181#255'C~'#182#234#255
+#255#255#0#255#255#255#0'zzz'#255#153#153#153#255'R'#145'Y'#255#153#154#153
+#255#155#155#155#255#156#156#156#255#156#156#156#255'l'#154#208#255#167#206
+#229#255#143#193#223#255#137#189#220#255#139#189#220#255'S'#141#182#255'K'
+#132#188#234#255#255#255#0#255#255#255#0'}}}'#255#153#153#153#255#153#153#153
+#255#154#154#154#255#154#154#154#255#155#155#155#255#155#155#155#255'o'#157
+#211#255#170#209#231#255#171#209#231#255#152#199#225#255#145#194#222#255'V'
+#143#183#255'R'#137#193#234#255#255#255#0#255#255#255#0#128#128#128#255'~~~'
+#255'|||'#255'zzz'#255'www'#255'uuu'#255'rrr'#255'q'#158#212#255'o'#158#214
+#255#135#178#220#255#171#211#232#255#169#208#230#255'X'#144#184#255'Y'#142
+#198#234#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255
+#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0'p'#158#214#219'm'#156#212#255#133#177#218#255'Z'#145#185#255'`'
+#147#203#234#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0'm'#156#212#137'j'#154#210#251'f'
+#151#207#238#7'OnClick'#7#13'acQuitExecute'#0#0#0#0#10'TImageList'#10'ImageL'
+'ist1'#4'left'#3#176#0#3'top'#2'x'#6'Bitmap'#10#14#12#0#0'Li'#3#0#0#0#16#0#0
+#0#16#0#0#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0#255#255#255#0#234#195#157#255#230#191#150#255#228#187#146#255#228#187
+#146#255#209#160'l'#245#208#158'm'#246#204#150'_'#218#196'yB~'#178'g<'#9#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255 +#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0#228#187#147#255#254#245#237#255#252#222#197#255#251#224#199#255#249
+#220#194#255#245#211#180#255#254#249#243#255#250#226#196#255#236#193#147#255
+#195'}H'#147#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0#255#255#255#0#229#190#150#255#255#255#254#255#253#243#233#255#253#243 +#255#0#255#255#255#0#229#190#150#255#255#255#254#255#253#243#233#255#253#243
+#234#255#252#242#232#255#250#239#227#255#250#242#231#255#234#187#136#255#207 +#234#255#252#242#232#255#250#239#227#255#250#242#231#255#234#187#136#255#207
+#133'U'#179#180'i='#12#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255 +#133'U'#179#180'i='#12#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255
+#0#255#255#255#0#255#255#255#0#234#195#157#255#230#191#150#255#228#187#146 +#0#255#255#255#0#255#255#255#0#228#187#147#255#254#245#237#255#252#222#197
+#255#228#187#146#255#209#160'l'#245#208#158'm'#246#204#150'_'#218#196'yB~' +#255#251#224#199#255#249#220#194#255#245#211#180#255#254#249#243#255#250#226
+#178'g<'#9#255#255#255#0#7'OnClick'#7#13'acOpenExecute'#0#0#9'TMenuItem'#9'm' +#196#255#236#193#147#255#195'}H'#147#255#255#255#0#255#255#255#0#255#255#255
+'nuSaveAs'#6'Action'#7#8'AcSaveAs'#11'Bitmap.Data'#10':'#4#0#0'6'#4#0#0'BM6' +#0#255#255#255#0#255#255#255#0#255#255#255#0#228#187#146#255#254#246#240#255
+#4#0#0#0#0#0#0'6'#0#0#0'('#0#0#0#16#0#0#0#16#0#0#0#1#0' '#0#0#0#0#0#0#4#0#0 +#252#226#205#255#252#227#205#255#250#223#200#255#247#217#188#255#245#233#221
+'d'#0#0#0'd'#0#0#0#0#0#0#0#0#0#0#0#186'j6'#0#185'i5'#181#184'i5'#238#183'h5' +#255#250#243#235#255#251#248#243#255#202#131'S'#254#255#255#255#0#255#255#255
+#255#181'h5'#255#180'g4'#255#178'f4'#255#176'e3'#255#174'd3'#255#172'c2'#255 +#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#228#187#146#255
+#170'b2'#255#169'a2'#255#168'`1'#255#167'`1'#254#166'`1'#241#168'a1'#196#186 +#254#247#241#255#252#229#210#255#252#228#209#255#251#226#204#255#249#221#196
+'j5'#222#235#198#173#255#234#197#173#255#254#251#248#255#254#251#248#255#254 +#255#246#215#187#255#243#209#175#255#250#239#228#255#204#135'X'#254'4'#180
+#251#248#255#254#251#248#255#254#251#248#255#254#251#248#255#254#251#248#255 +#217#208'^'#194#225#250'`'#195#226#250'`'#195#226#250'`'#195#226#250'_'#195
+#254#251#248#255#254#251#248#255#254#251#248#255#200#154'|'#255#199#152'y' +#226#250#228#187#145#255#255#247#242#255#254#231#213#255#254#231#213#255#253
+#255#167'`1'#237#186'k7'#254#237#202#179#255#224#162'z'#255#254#250#247#255 +#229#209#255#250#224#202#255#249#222#196#255#247#217#188#255#253#242#231#255
+'b'#192#136#255'b'#192#136#255'b'#192#136#255'b'#192#136#255'b'#192#136#255 +#204#135'W'#254'6'#179#218#248#253#254#254#255#254#255#255#255#254#254#255
+'b'#192#136#255'b'#192#136#255'b'#192#136#255#253#249#246#255#202#141'e'#255 +#255#253#254#255#255#254#255#255#255#228#186#145#255#255#247#240#255#255#231
+#201#155'|'#255#167'`1'#254#187'l8'#255#238#204#182#255#225#162'z'#255#254 +#213#255#253#231#214#255#253#230#212#255#252#228#208#255#251#227#203#255#250
+#250#247#255#191#220#194#255#191#220#194#255#191#220#194#255#191#220#194#255 +#220#194#255#254#243#232#255#204#134'V'#254'5'#175#218#240#247#252#254#255
+#191#220#194#255#191#220#194#255#191#220#194#255#191#220#194#255#253#249#246 +#142#228#248#255#145#222#245#255#159#224#245#255#172#225#246#255#202#132'R'
+#255#205#144'h'#255#204#158#129#255#168'a2'#255#187'k8'#255#239#206#184#255 +#255#255#247#241#255#255#233#217#255#255#234#219#255#255#233#217#255#255#231
+#225#162'y'#255#254#250#247#255'b'#192#136#255'b'#192#136#255'b'#192#136#255 +#215#255#255#229#210#255#255#226#203#255#255#247#241#255#203#133'U'#254'6'
+'b'#192#136#255'b'#192#136#255'b'#192#136#255'b'#192#136#255'b'#192#136#255 +#170#218#242#241#250#253#255#148#222#245#255#147#220#244#255'd'#188#233#255
+#253#249#246#255#207#147'j'#255#206#163#132#255#170'a2'#255#186'j6'#255#239 +'5'#148#218#255'5'#148#218#255'5'#148#218#255'5'#148#218#255'5'#148#218#255
+#208#187#255#226#162'z'#255#254#251#248#255#254#251#248#255#254#251#248#255 +'5'#148#218#255'5'#148#218#255'5'#148#218#255'5'#148#218#255#251#246#239#255
+#204#131'U'#254'5'#171#218#250#232#246#251#255'p'#188#231#255'U'#170#226#255
+'M'#165#224#255#145#201#235#255#250#243#239#255#253#254#253#255#255#253#252
+#255#255#253#252#255#254#253#252#255#254#252#251#255#254#254#253#255'5'#148
+#218#255#239#242#232#255#206#129'V'#255'7'#166#218#250#254#255#255#255#248
+#253#255#255#246#253#255#255#245#252#255#255#243#252#254#255#154#228#244#255
+#154#230#247#255#155#230#246#255#157#229#245#255#158#229#245#255#159#229#244
+#255#218#243#248#255'5'#148#218#255#253#244#238#255#202#128'T'#249'6'#161#218
+#249#246#252#254#255#148#229#248#255#147#229#248#255#147#229#248#255#145#229
+#248#255#147#219#233#255#147#215#227#255#147#210#220#255#144#206#215#255#140
+#200#207#255#134#193#198#255#201#216#214#255'5'#148#218#255#197'tD'#232#202
+#127'S'#241'6'#154#218#248#242#250#253#255#148#230#248#255#146#229#248#255
+#144#229#248#255#139#227#248#255#134#226#247#255#127#225#247#255'w'#222#246
+#255'l'#220#246#255'^'#217#244#255'O'#213#243#255#204#242#251#255'5'#148#218
+#255#255#255#255#0#255#255#255#0'5'#148#218#247#239#250#254#255#147#229#248
+#255#143#228#248#255#137#227#248#255#130#225#247#255'z'#223#247#255'q'#222
+#246#255'g'#219#245#255'['#216#244#255'M'#212#243#255'@'#209#242#255#202#242
,#251#255'5'#148#218#255#255#255#255#0#255#255#255#0'3'#142#217#251#220#240
+#250#255#152#225#246#255#149#224#246#255#146#223#246#255#142#222#245#255#137
+#220#245#255#133#218#244#255#128#217#244#255'z'#215#243#255't'#213#243#255'p'
+#211#242#255#194#234#248#255'5'#148#218#255#255#255#255#0#255#255#255#0','
+#134#216#0'-'#136#216#247'-'#135#216#247'-'#136#216#247'-'#136#216#247'-'#136
+#216#247'-'#136#216#247'-'#136#216#247'-'#136#216#247'-'#136#216#247'-'#136
+#216#247'-'#135#216#247'-'#136#216#247','#134#216#0#255#255#255#0#255#255#255
+#0#188'k6q'#188'k6'#144#188'k6'#204#188'k6'#238#188'k6'#250#187'k6'#254#187
+'k6'#255#187'j6'#255#187'j6'#255#188'l9'#255#189'n;'#255#187'm:'#255#187'k8'
+#239#187'p>'#203#182'i5T'#255#255#255#0#188'k6'#155#246#224#209#255#247#224
+#209#255#254#251#248#255#254#251#247#255#253#249#246#255#252#245#240#255#250
+#240#234#255#251#242#237#255#253#249#246#255#253#250#247#255#251#241#235#255
+#248#233#223#254#236#208#189#251#201#137'^'#236#181'i5c'#188'k6'#216#246#223
+#209#255#233#170#128#255#254#250#246#255#253#250#246#255#200#140'd'#255#251
+#243#238#255#251#241#234#255#252#246#242#255#254#251#248#255#252#246#241#255
+#249#236#226#255#248#231#219#255#238#208#186#255#236#208#189#255#187'p>'#248
+#188'k6'#240#246#223#208#255#232#168'~'#255#252#246#241#255#252#246#241#255
+#200#140'd'#255#250#241#233#255#251#244#238#255#253#250#247#255#253#249#246
+#255#250#240#232#255#248#232#221#255#247#230#219#255#225#163'z'#255#239#213
+#195#255#183'i5'#254#188'k6'#250#245#221#204#255#231#168'~'#255#250#240#232
+#255#250#240#232#255#201#141'f'#255#250#240#233#255#253#248#243#255#254#250
+#248#255#252#244#239#255#249#233#223#255#247#231#219#255#247#229#217#255#224
+#162'x'#255#231#194#169#255#182'h5'#255#187'k6'#254#244#220#201#255#231#167
+'}'#255#249#236#225#255#249#236#225#255#249#237#227#255#252#244#238#255#253
+#250#247#255#253#247#243#255#250#237#229#255#247#231#219#255#247#229#217#255
+#246#229#216#255#222#160'w'#255#228#190#164#255#180'g4'#255#187'k6'#255#244
+#217#199#255#230#166'}'#255#200#140'd'#255#201#141'e'#255#201#142'g'#255#203
+#146'l'#255#203#146'm'#255#202#144'i'#255#200#140'e'#255#200#140'd'#255#200
+#140'd'#255#200#140'd'#255#218#156't'#255#225#186#159#255#179'f4'#255#187'j6'
+#255#242#216#197#255#227#164'{'#255#227#163'z'#255#227#164'z'#255#226#164'{'
+#255#226#163'{'#255#225#163'{'#255#225#162'y'#255#223#160'w'#255#222#159'v'
+#255#221#158't'#255#219#156'r'#255#220#157't'#255#221#181#154#255#177'e4'#255
+#187'j6'#255#242#213#194#255#227#163'z'#255#227#163'z'#255#226#163'{'#255#226
+#163'{'#255#226#164'{'#255#225#162'y'#255#224#161'x'#255#222#160'w'#255#222
+#158'u'#255#220#157't'#255#218#155's'#255#217#155's'#255#218#176#149#255#175
+'d3'#255#187'j6'#255#240#210#190#255#226#163'z'#255#226#163'z'#255#225#163'z'
+#255#226#163'{'#255#225#163'{'#255#224#161'x'#255#222#159'w'#255#221#159'v'
+#255#220#157't'#255#217#155'r'#255#216#153'q'#255#214#153'p'#255#213#171#142
+#255#173'c3'#255#186'j6'#255#239#208#187#255#226#162'z'#255#254#251#248#255
+#254#251#248#255#254#251#248#255#254#251#248#255#254#251#248#255#254#251#248 +#254#251#248#255#254#251#248#255#254#251#248#255#254#251#248#255#254#251#248
+#255#254#251#248#255#254#251#248#255#211#150'm'#255#210#167#138#255#171'b2' +#255#254#251#248#255#254#251#248#255#254#251#248#255#254#251#248#255#211#150
+#255#187'j6'#255#240#210#190#255#226#163'z'#255#226#163'z'#255#225#163'z'#255 +'m'#255#210#167#138#255#171'b2'#255#187'k8'#255#239#206#184#255#225#162'y'
+#226#163'{'#255#225#163'{'#255#224#161'x'#255#222#159'w'#255#221#159'v'#255 +#255#254#250#247#255'b'#192#136#255'b'#192#136#255'b'#192#136#255'b'#192#136
+#220#157't'#255#217#155'r'#255#216#153'q'#255#214#153'p'#255#213#171#142#255 +#255'b'#192#136#255'b'#192#136#255'b'#192#136#255'b'#192#136#255#253#249#246
+#173'c3'#255#187'j6'#255#242#213#194#255#227#163'z'#255#227#163'z'#255#226 +#255#207#147'j'#255#206#163#132#255#170'a2'#255#187'l8'#255#238#204#182#255
+#163'{'#255#226#163'{'#255#226#164'{'#255#225#162'y'#255#224#161'x'#255#222 +#225#162'z'#255#254#250#247#255#191#220#194#255#191#220#194#255#191#220#194
+#160'w'#255#222#158'u'#255#220#157't'#255#218#155's'#255#217#155's'#255#218 +#255#191#220#194#255#191#220#194#255#191#220#194#255#191#220#194#255#191#220
+#176#149#255#175'd3'#255#187'j6'#255#242#216#197#255#227#164'{'#255#227#163 +#194#255#253#249#246#255#205#144'h'#255#204#158#129#255#168'a2'#255#186'k7'
+'z'#255#227#164'z'#255#226#164'{'#255#226#163'{'#255#225#163'{'#255#225#162 +#254#237#202#179#255#224#162'z'#255#254#250#247#255'b'#192#136#255'b'#192#136
+'y'#255#223#160'w'#255#222#159'v'#255#221#158't'#255#219#156'r'#255#220#157 +#255'b'#192#136#255'b'#192#136#255'b'#192#136#255'b'#192#136#255'b'#192#136
+'t'#255#221#181#154#255#177'e4'#255#187'k6'#255#244#217#199#255#230#166'}' +#255'b'#192#136#255#253#249#246#255#202#141'e'#255#201#155'|'#255#167'`1'#254
,#255#200#140'd'#255#201#141'e'#255#201#142'g'#255#203#146'l'#255#203#146'm' +#186'j5'#222#235#198#173#255#234#197#173#255#254#251#248#255#254#251#248#255
+#255#202#144'i'#255#200#140'e'#255#200#140'd'#255#200#140'd'#255#200#140'd'
+#255#218#156't'#255#225#186#159#255#179'f4'#255#187'k6'#254#244#220#201#255
+#231#167'}'#255#249#236#225#255#249#236#225#255#249#237#227#255#252#244#238
+#255#253#250#247#255#253#247#243#255#250#237#229#255#247#231#219#255#247#229
+#217#255#246#229#216#255#222#160'w'#255#228#190#164#255#180'g4'#255#188'k6'
+#250#245#221#204#255#231#168'~'#255#250#240#232#255#250#240#232#255#201#141
+'f'#255#250#240#233#255#253#248#243#255#254#250#248#255#252#244#239#255#249
+#233#223#255#247#231#219#255#247#229#217#255#224#162'x'#255#231#194#169#255
+#182'h5'#255#188'k6'#240#246#223#208#255#232#168'~'#255#252#246#241#255#252
+#246#241#255#200#140'd'#255#250#241#233#255#251#244#238#255#253#250#247#255
+#253#249#246#255#250#240#232#255#248#232#221#255#247#230#219#255#225#163'z'
+#255#239#213#195#255#183'i5'#254#188'k6'#216#246#223#209#255#233#170#128#255
+#254#250#246#255#253#250#246#255#200#140'd'#255#251#243#238#255#251#241#234
+#255#252#246#242#255#254#251#248#255#252#246#241#255#249#236#226#255#248#231
+#219#255#238#208#186#255#236#208#189#255#187'p>'#248#188'k6'#155#246#224#209
+#255#247#224#209#255#254#251#248#255#254#251#247#255#253#249#246#255#252#245
+#240#255#250#240#234#255#251#242#237#255#253#249#246#255#253#250#247#255#251
+#241#235#255#248#233#223#254#236#208#189#251#201#137'^'#236#181'i5c'#188'k6q'
+#188'k6'#144#188'k6'#204#188'k6'#238#188'k6'#250#187'k6'#254#187'k6'#255#187
+'j6'#255#187'j6'#255#188'l9'#255#189'n;'#255#187'm:'#255#187'k8'#239#187'p>'
+#203#182'i5T'#255#255#255#0#7'OnClick'#7#15'acSaveAsExecute'#0#0#9'TMenuItem'
+#9'MenuItem1'#7'Caption'#6#1'-'#0#0#9'TMenuItem'#7'mnuQuit'#6'Action'#7#6'Ac'
+'Quit'#11'Bitmap.Data'#10':'#4#0#0'6'#4#0#0'BM6'#4#0#0#0#0#0#0'6'#0#0#0'('#0
+#0#0#16#0#0#0#16#0#0#0#1#0' '#0#0#0#0#0#0#4#0#0'd'#0#0#0'd'#0#0#0#0#0#0#0#0#0
+#0#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#29'c'#155#22#25'`'
+#152'9'#20']'#149'b'#16'Z'#146#136#13'X'#144#164#19'\'#146#252#12'W'#143#237
+#153#153#153#255'qqq'#255'TTT'#255'QQQ'#255'OOO'#255'LLL'#255'JJJ'#255'GGG'
+#255'EEE'#255'%g'#157#255'2t'#168#255'=|'#175#255'G'#132#181#255'N'#138#186
+#255'>~'#173#255#12'W'#143#234#255#255#255#0#255#255#255#0'XXX'#255#162#162
+#162#255#162#162#162#255#163#163#163#255#164#164#164#255#164#164#164#255#165
+#165#165#255'/o'#165#255'x'#171#210#255'x'#171#211#255's'#167#209#255'i'#160
+#205#255'@'#127#174#255#15'Y'#145#234#255#255#255#0#255#255#255#0'\\\'#255
+#161#161#161#255'<s@'#255#160#161#161#255#163#163#163#255#163#163#163#255#164
+#164#164#255'6t'#170#255'}'#175#212#255'['#154#201#255'T'#149#199#255'X'#150
+#200#255'A'#128#174#255#19'\'#148#234#255#255#255#0#255#255#255#0'```'#255
+#160#160#160#255'=vA'#255'6q9'#255#162#162#162#255#162#162#162#255#163#163
+#163#255'=y'#176#255#130#179#215#255'b'#159#204#255'Z'#154#201#255'^'#155#202
+#255'C'#129#175#255#25'`'#152#234'7'#130'>'#255'4~;'#255'1y7'#255'.u4'#255'I'
+#145'P'#255'F'#143'L'#255'9s='#255#161#161#161#255#162#162#162#255'E~'#180
+#255#136#183#217#255'g'#163#207#255'a'#158#204#255'c'#159#204#255'E'#131#177
+#255#31'd'#156#234';'#135'B'#255#137#203#146#255#132#200#141#255#128#198#136
+#255'{'#195#131#255'w'#193#127#255'G'#143'M'#255';t?'#255#161#161#161#255'L'
+#132#186#255#141#187#219#255'n'#168#209#255'f'#166#209#255'_'#180#223#255'G'
+#133#177#255'%i'#161#234'>'#139'F'#255#143#206#153#255'}'#198#135#255'x'#195
+#129#255's'#192'|'#255't'#192'|'#255'y'#194#129#255'I'#144'O'#255'T'#127'W'
+#255'T'#137#191#255#148#191#221#255'u'#173#212#255'c'#184#225#255'K'#212#255
+#255'B'#139#184#255',n'#166#234'A'#144'J'#255#148#210#159#255#145#208#154#255
+#141#205#150#255#137#203#146#255#132#200#141#255'Q'#152'X'#255'A|F'#255#159
+#159#159#255'Z'#142#196#255#152#195#224#255'|'#179#215#255't'#175#214#255'^'
+#196#237#255'K'#136#179#255'4s'#171#234'D'#148'M'#255'B'#145'K'#255'?'#141'H'
+#255'='#137'E'#255']'#164'e'#255'Z'#160'a'#255'E'#131'K'#255#158#158#158#255
+#158#158#158#255'`'#146#201#255#158#199#226#255#131#184#218#255'}'#180#215
+#255'~'#179#215#255'O'#137#180#255';y'#177#234#255#255#255#0#255#255#255#0'w'
+'ww'#255#154#154#154#255'='#138'E'#255'I'#138'O'#255#156#156#156#255#157#157
+#157#255#157#157#157#255'f'#150#204#255#162#203#227#255#137#189#220#255#131
+#185#218#255#132#185#218#255'Q'#139#181#255'C~'#182#234#255#255#255#0#255#255
+#255#0'zzz'#255#153#153#153#255'R'#145'Y'#255#153#154#153#255#155#155#155#255
+#156#156#156#255#156#156#156#255'l'#154#208#255#167#206#229#255#143#193#223
+#255#137#189#220#255#139#189#220#255'S'#141#182#255'K'#132#188#234#255#255
+#255#0#255#255#255#0'}}}'#255#153#153#153#255#153#153#153#255#154#154#154#255
+#154#154#154#255#155#155#155#255#155#155#155#255'o'#157#211#255#170#209#231
+#255#171#209#231#255#152#199#225#255#145#194#222#255'V'#143#183#255'R'#137
,#193#234#255#255#255#0#255#255#255#0#128#128#128#255'~~~'#255'|||'#255'zzz'
+#255'www'#255'uuu'#255'rrr'#255'q'#158#212#255'o'#158#214#255#135#178#220#255
+#171#211#232#255#169#208#230#255'X'#144#184#255'Y'#142#198#234#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0'p'#158#214
+#219'm'#156#212#255#133#177#218#255'Z'#145#185#255'`'#147#203#234#255#255#255
+#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0#255#255#255#0'm'#156#212#137'j'#154#210#251'f'#151#207#238#7'OnClick'
+#7#13'acQuitExecute'#0#0#0#0#10'TImageList'#10'ImageList1'#4'left'#3#176#0#3
+'top'#2'x'#6'Bitmap'#10#14#12#0#0'Li'#3#0#0#0#16#0#0#0#16#0#0#0#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#234
+#195#157#255#230#191#150#255#228#187#146#255#228#187#146#255#209#160'l'#245
+#208#158'm'#246#204#150'_'#218#196'yB~'#178'g<'#9#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#229
+#190#150#255#255#255#254#255#253#243#233#255#253#243#234#255#252#242#232#255
+#250#239#227#255#250#242#231#255#234#187#136#255#207#133'U'#179#180'i='#12
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#228#187#147#255#254#245#237#255#252#222#197#255#251#224#199#255
+#249#220#194#255#245#211#180#255#254#249#243#255#250#226#196#255#236#193#147
+#255#195'}H'#147#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#228#187#146#255#254#246#240#255#252#226#205#255#252
+#227#205#255#250#223#200#255#247#217#188#255#245#233#221#255#250#243#235#255
+#251#248#243#255#202#131'S'#254#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0#228#187#146#255#254#247#241#255#252
+#229#210#255#252#228#209#255#251#226#204#255#249#221#196#255#246#215#187#255
+#243#209#175#255#250#239#228#255#204#135'X'#254'4'#180#217#208'^'#194#225#250
+'`'#195#226#250'`'#195#226#250'`'#195#226#250'_'#195#226#250#228#187#145#255
+#255#247#242#255#254#231#213#255#254#231#213#255#253#229#209#255#250#224#202
+#255#249#222#196#255#247#217#188#255#253#242#231#255#204#135'W'#254'6'#179
+#218#248#253#254#254#255#254#255#255#255#254#254#255#255#253#254#255#255#254
+#255#255#255#228#186#145#255#255#247#240#255#255#231#213#255#253#231#214#255
+#253#230#212#255#252#228#208#255#251#227#203#255#250#220#194#255#254#243#232
+#255#204#134'V'#254'5'#175#218#240#247#252#254#255#142#228#248#255#145#222
+#245#255#159#224#245#255#172#225#246#255#202#132'R'#255#255#247#241#255#255
+#233#217#255#255#234#219#255#255#233#217#255#255#231#215#255#255#229#210#255
+#255#226#203#255#255#247#241#255#203#133'U'#254'6'#170#218#242#241#250#253
+#255#148#222#245#255#147#220#244#255'd'#188#233#255'5'#148#218#255'5'#148#218
+#255'5'#148#218#255'5'#148#218#255'5'#148#218#255'5'#148#218#255'5'#148#218
+#255'5'#148#218#255'5'#148#218#255#251#246#239#255#204#131'U'#254'5'#171#218
+#250#232#246#251#255'p'#188#231#255'U'#170#226#255'M'#165#224#255#145#201#235
+#255#250#243#239#255#253#254#253#255#255#253#252#255#255#253#252#255#254#253
+#252#255#254#252#251#255#254#254#253#255'5'#148#218#255#239#242#232#255#206
+#129'V'#255'7'#166#218#250#254#255#255#255#248#253#255#255#246#253#255#255
+#245#252#255#255#243#252#254#255#154#228#244#255#154#230#247#255#155#230#246
+#255#157#229#245#255#158#229#245#255#159#229#244#255#218#243#248#255'5'#148
+#218#255#253#244#238#255#202#128'T'#249'6'#161#218#249#246#252#254#255#148
+#229#248#255#147#229#248#255#147#229#248#255#145#229#248#255#147#219#233#255
+#147#215#227#255#147#210#220#255#144#206#215#255#140#200#207#255#134#193#198
+#255#201#216#214#255'5'#148#218#255#197'tD'#232#202#127'S'#241'6'#154#218#248
+#242#250#253#255#148#230#248#255#146#229#248#255#144#229#248#255#139#227#248
+#255#134#226#247#255#127#225#247#255'w'#222#246#255'l'#220#246#255'^'#217#244
+#255'O'#213#243#255#204#242#251#255'5'#148#218#255#255#255#255#0#255#255#255
+#0'5'#148#218#247#239#250#254#255#147#229#248#255#143#228#248#255#137#227#248
+#255#130#225#247#255'z'#223#247#255'q'#222#246#255'g'#219#245#255'['#216#244
+#255'M'#212#243#255'@'#209#242#255#202#242#251#255'5'#148#218#255#255#255#255
+#0#255#255#255#0'3'#142#217#251#220#240#250#255#152#225#246#255#149#224#246
+#255#146#223#246#255#142#222#245#255#137#220#245#255#133#218#244#255#128#217
+#244#255'z'#215#243#255't'#213#243#255'p'#211#242#255#194#234#248#255'5'#148
+#218#255#255#255#255#0#255#255#255#0','#134#216#0'-'#136#216#247'-'#135#216
+#247'-'#136#216#247'-'#136#216#247'-'#136#216#247'-'#136#216#247'-'#136#216
+#247'-'#136#216#247'-'#136#216#247'-'#136#216#247'-'#135#216#247'-'#136#216
+#247','#134#216#0#255#255#255#0#255#255#255#0#188'k6q'#188'k6'#144#188'k6'
+#204#188'k6'#238#188'k6'#250#187'k6'#254#187'k6'#255#187'j6'#255#187'j6'#255
,#188'l9'#255#189'n;'#255#187'm:'#255#187'k8'#239#187'p>'#203#182'i5T'#255#255
+#255#0#188'k6'#155#246#224#209#255#247#224#209#255#254#251#248#255#254#251
+#247#255#253#249#246#255#252#245#240#255#250#240#234#255#251#242#237#255#253
+#249#246#255#253#250#247#255#251#241#235#255#248#233#223#254#236#208#189#251
+#201#137'^'#236#181'i5c'#188'k6'#216#246#223#209#255#233#170#128#255#254#250
+#246#255#253#250#246#255#200#140'd'#255#251#243#238#255#251#241#234#255#252
+#246#242#255#254#251#248#255#252#246#241#255#249#236#226#255#248#231#219#255
+#238#208#186#255#236#208#189#255#187'p>'#248#188'k6'#240#246#223#208#255#232
+#168'~'#255#252#246#241#255#252#246#241#255#200#140'd'#255#250#241#233#255
+#251#244#238#255#253#250#247#255#253#249#246#255#250#240#232#255#248#232#221
+#255#247#230#219#255#225#163'z'#255#239#213#195#255#183'i5'#254#188'k6'#250
+#245#221#204#255#231#168'~'#255#250#240#232#255#250#240#232#255#201#141'f'
+#255#250#240#233#255#253#248#243#255#254#250#248#255#252#244#239#255#249#233
+#223#255#247#231#219#255#247#229#217#255#224#162'x'#255#231#194#169#255#182
+'h5'#255#187'k6'#254#244#220#201#255#231#167'}'#255#249#236#225#255#249#236
+#225#255#249#237#227#255#252#244#238#255#253#250#247#255#253#247#243#255#250
+#237#229#255#247#231#219#255#247#229#217#255#246#229#216#255#222#160'w'#255
+#228#190#164#255#180'g4'#255#187'k6'#255#244#217#199#255#230#166'}'#255#200
+#140'd'#255#201#141'e'#255#201#142'g'#255#203#146'l'#255#203#146'm'#255#202
+#144'i'#255#200#140'e'#255#200#140'd'#255#200#140'd'#255#200#140'd'#255#218
+#156't'#255#225#186#159#255#179'f4'#255#187'j6'#255#242#216#197#255#227#164
+'{'#255#227#163'z'#255#227#164'z'#255#226#164'{'#255#226#163'{'#255#225#163
+'{'#255#225#162'y'#255#223#160'w'#255#222#159'v'#255#221#158't'#255#219#156
+'r'#255#220#157't'#255#221#181#154#255#177'e4'#255#187'j6'#255#242#213#194
+#255#227#163'z'#255#227#163'z'#255#226#163'{'#255#226#163'{'#255#226#164'{'
+#255#225#162'y'#255#224#161'x'#255#222#160'w'#255#222#158'u'#255#220#157't'
+#255#218#155's'#255#217#155's'#255#218#176#149#255#175'd3'#255#187'j6'#255
+#240#210#190#255#226#163'z'#255#226#163'z'#255#225#163'z'#255#226#163'{'#255
+#225#163'{'#255#224#161'x'#255#222#159'w'#255#221#159'v'#255#220#157't'#255
+#217#155'r'#255#216#153'q'#255#214#153'p'#255#213#171#142#255#173'c3'#255#186
+'j6'#255#239#208#187#255#226#162'z'#255#254#251#248#255#254#251#248#255#254
+#251#248#255#254#251#248#255#254#251#248#255#254#251#248#255#254#251#248#255
+#254#251#248#255#254#251#248#255#254#251#248#255#211#150'm'#255#210#167#138
+#255#171'b2'#255#187'k8'#255#239#206#184#255#225#162'y'#255#254#250#247#255
+'b'#192#136#255'b'#192#136#255'b'#192#136#255'b'#192#136#255'b'#192#136#255
+'b'#192#136#255'b'#192#136#255'b'#192#136#255#253#249#246#255#207#147'j'#255
+#206#163#132#255#170'a2'#255#187'l8'#255#238#204#182#255#225#162'z'#255#254
+#250#247#255#191#220#194#255#191#220#194#255#191#220#194#255#191#220#194#255
+#191#220#194#255#191#220#194#255#191#220#194#255#191#220#194#255#253#249#246
+#255#205#144'h'#255#204#158#129#255#168'a2'#255#186'k7'#254#237#202#179#255
+#224#162'z'#255#254#250#247#255'b'#192#136#255'b'#192#136#255'b'#192#136#255
+'b'#192#136#255'b'#192#136#255'b'#192#136#255'b'#192#136#255'b'#192#136#255
+#253#249#246#255#202#141'e'#255#201#155'|'#255#167'`1'#254#186'j5'#222#235
+#198#173#255#234#197#173#255#254#251#248#255#254#251#248#255#254#251#248#255
+#254#251#248#255#254#251#248#255#254#251#248#255#254#251#248#255#254#251#248 +#254#251#248#255#254#251#248#255#254#251#248#255#254#251#248#255#254#251#248
+#255#254#251#248#255#254#251#248#255#200#154'|'#255#199#152'y'#255#167'`1' +#255#254#251#248#255#254#251#248#255#254#251#248#255#200#154'|'#255#199#152
+#237#186'j6'#0#185'i5'#181#184'i5'#238#183'h5'#255#181'h5'#255#180'g4'#255 +'y'#255#167'`1'#237#186'j6'#0#185'i5'#181#184'i5'#238#183'h5'#255#181'h5'#255
+#178'f4'#255#176'e3'#255#174'd3'#255#172'c2'#255#170'b2'#255#169'a2'#255#168 +#180'g4'#255#178'f4'#255#176'e3'#255#174'd3'#255#172'c2'#255#170'b2'#255#169
+'`1'#255#167'`1'#254#166'`1'#241#168'a1'#196#255#255#255#0#255#255#255#0#255 +'a2'#255#168'`1'#255#167'`1'#254#166'`1'#241#168'a1'#196#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255 +#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0 +#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
+'m'#156#212#137'j'#154#210#251'f'#151#207#238#255#255#255#0#255#255#255#0#255 +#255#255#255#0'm'#156#212#137'j'#154#210#251'f'#151#207#238#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255 +#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0'p'#158#214#219'm'#156#212 +#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0'p'#158#214#219
+#255#133#177#218#255'Z'#145#185#255'`'#147#203#234#255#255#255#0#255#255#255 +'m'#156#212#255#133#177#218#255'Z'#145#185#255'`'#147#203#234#255#255#255#0
+#0#128#128#128#255'~~~'#255'|||'#255'zzz'#255'www'#255'uuu'#255'rrr'#255'q' +#255#255#255#0#128#128#128#255'~~~'#255'|||'#255'zzz'#255'www'#255'uuu'#255
+#158#212#255'o'#158#214#255#135#178#220#255#171#211#232#255#169#208#230#255 ,'rrr'#255'q'#158#212#255'o'#158#214#255#135#178#220#255#171#211#232#255#169
+'X'#144#184#255'Y'#142#198#234#255#255#255#0#255#255#255#0'}}}'#255#153#153 +#208#230#255'X'#144#184#255'Y'#142#198#234#255#255#255#0#255#255#255#0'}}}'
+#153#255#153#153#153#255#154#154#154#255#154#154#154#255#155#155#155#255#155 +#255#153#153#153#255#153#153#153#255#154#154#154#255#154#154#154#255#155#155
+#155#155#255'o'#157#211#255#170#209#231#255#171#209#231#255#152#199#225#255 +#155#255#155#155#155#255'o'#157#211#255#170#209#231#255#171#209#231#255#152
+#145#194#222#255'V'#143#183#255'R'#137#193#234#255#255#255#0#255#255#255#0'z' +#199#225#255#145#194#222#255'V'#143#183#255'R'#137#193#234#255#255#255#0#255
+'zz'#255#153#153#153#255'R'#145'Y'#255#153#154#153#255#155#155#155#255#156 +#255#255#0'zzz'#255#153#153#153#255'R'#145'Y'#255#153#154#153#255#155#155#155
+#156#156#255#156#156#156#255'l'#154#208#255#167#206#229#255#143#193#223#255 +#255#156#156#156#255#156#156#156#255'l'#154#208#255#167#206#229#255#143#193
+#137#189#220#255#139#189#220#255'S'#141#182#255'K'#132#188#234#255#255#255#0 +#223#255#137#189#220#255#139#189#220#255'S'#141#182#255'K'#132#188#234#255
,#255#255#255#0'www'#255#154#154#154#255'='#138'E'#255'I'#138'O'#255#156#156 +#255#255#0#255#255#255#0'www'#255#154#154#154#255'='#138'E'#255'I'#138'O'#255
+#156#255#157#157#157#255#157#157#157#255'f'#150#204#255#162#203#227#255#137 +#156#156#156#255#157#157#157#255#157#157#157#255'f'#150#204#255#162#203#227
+#189#220#255#131#185#218#255#132#185#218#255'Q'#139#181#255'C~'#182#234'D' +#255#137#189#220#255#131#185#218#255#132#185#218#255'Q'#139#181#255'C~'#182
+#148'M'#255'B'#145'K'#255'?'#141'H'#255'='#137'E'#255']'#164'e'#255'Z'#160'a' +#234'D'#148'M'#255'B'#145'K'#255'?'#141'H'#255'='#137'E'#255']'#164'e'#255'Z'
+#255'E'#131'K'#255#158#158#158#255#158#158#158#255'`'#146#201#255#158#199#226 +#160'a'#255'E'#131'K'#255#158#158#158#255#158#158#158#255'`'#146#201#255#158
+#255#131#184#218#255'}'#180#215#255'~'#179#215#255'O'#137#180#255';y'#177#234 +#199#226#255#131#184#218#255'}'#180#215#255'~'#179#215#255'O'#137#180#255';y'
+'A'#144'J'#255#148#210#159#255#145#208#154#255#141#205#150#255#137#203#146 +#177#234'A'#144'J'#255#148#210#159#255#145#208#154#255#141#205#150#255#137
+#255#132#200#141#255'Q'#152'X'#255'A|F'#255#159#159#159#255'Z'#142#196#255 +#203#146#255#132#200#141#255'Q'#152'X'#255'A|F'#255#159#159#159#255'Z'#142
+#152#195#224#255'|'#179#215#255't'#175#214#255'^'#196#237#255'K'#136#179#255 +#196#255#152#195#224#255'|'#179#215#255't'#175#214#255'^'#196#237#255'K'#136
+'4s'#171#234'>'#139'F'#255#143#206#153#255'}'#198#135#255'x'#195#129#255's' +#179#255'4s'#171#234'>'#139'F'#255#143#206#153#255'}'#198#135#255'x'#195#129
+#192'|'#255't'#192'|'#255'y'#194#129#255'I'#144'O'#255'T'#127'W'#255'T'#137 +#255's'#192'|'#255't'#192'|'#255'y'#194#129#255'I'#144'O'#255'T'#127'W'#255
+#191#255#148#191#221#255'u'#173#212#255'c'#184#225#255'K'#212#255#255'B'#139 +'T'#137#191#255#148#191#221#255'u'#173#212#255'c'#184#225#255'K'#212#255#255
+#184#255',n'#166#234';'#135'B'#255#137#203#146#255#132#200#141#255#128#198 +'B'#139#184#255',n'#166#234';'#135'B'#255#137#203#146#255#132#200#141#255#128
+#136#255'{'#195#131#255'w'#193#127#255'G'#143'M'#255';t?'#255#161#161#161#255 +#198#136#255'{'#195#131#255'w'#193#127#255'G'#143'M'#255';t?'#255#161#161#161
+'L'#132#186#255#141#187#219#255'n'#168#209#255'f'#166#209#255'_'#180#223#255 +#255'L'#132#186#255#141#187#219#255'n'#168#209#255'f'#166#209#255'_'#180#223
+'G'#133#177#255'%i'#161#234'7'#130'>'#255'4~;'#255'1y7'#255'.u4'#255'I'#145 +#255'G'#133#177#255'%i'#161#234'7'#130'>'#255'4~;'#255'1y7'#255'.u4'#255'I'
+'P'#255'F'#143'L'#255'9s='#255#161#161#161#255#162#162#162#255'E~'#180#255 +#145'P'#255'F'#143'L'#255'9s='#255#161#161#161#255#162#162#162#255'E~'#180
+#136#183#217#255'g'#163#207#255'a'#158#204#255'c'#159#204#255'E'#131#177#255 +#255#136#183#217#255'g'#163#207#255'a'#158#204#255'c'#159#204#255'E'#131#177
+#31'd'#156#234#255#255#255#0#255#255#255#0'```'#255#160#160#160#255'=vA'#255 +#255#31'd'#156#234#255#255#255#0#255#255#255#0'```'#255#160#160#160#255'=vA'
+'6q9'#255#162#162#162#255#162#162#162#255#163#163#163#255'=y'#176#255#130#179 +#255'6q9'#255#162#162#162#255#162#162#162#255#163#163#163#255'=y'#176#255#130
+#215#255'b'#159#204#255'Z'#154#201#255'^'#155#202#255'C'#129#175#255#25'`' +#179#215#255'b'#159#204#255'Z'#154#201#255'^'#155#202#255'C'#129#175#255#25
+#152#234#255#255#255#0#255#255#255#0'\\\'#255#161#161#161#255'<s@'#255#160 +'`'#152#234#255#255#255#0#255#255#255#0'\\\'#255#161#161#161#255'<s@'#255#160
+#161#161#255#163#163#163#255#163#163#163#255#164#164#164#255'6t'#170#255'}' +#161#161#255#163#163#163#255#163#163#163#255#164#164#164#255'6t'#170#255'}'
+#175#212#255'['#154#201#255'T'#149#199#255'X'#150#200#255'A'#128#174#255#19 +#175#212#255'['#154#201#255'T'#149#199#255'X'#150#200#255'A'#128#174#255#19
+'\'#148#234#255#255#255#0#255#255#255#0'XXX'#255#162#162#162#255#162#162#162 +'\'#148#234#255#255#255#0#255#255#255#0'XXX'#255#162#162#162#255#162#162#162

View File

@ -6,7 +6,7 @@ interface
uses uses
Classes, SysUtils, FileUtil, LResources, Forms, Controls, Graphics, Dialogs, Classes, SysUtils, FileUtil, LResources, Forms, Controls, Graphics, Dialogs,
StdCtrls, Menus, ExtCtrls, ComCtrls, ActnList, StdCtrls, Menus, ExtCtrls, ComCtrls, ActnList, Spin,
fpspreadsheetgrid, fpspreadsheet, fpsallformats; fpspreadsheetgrid, fpspreadsheet, fpsallformats;
type type
@ -21,7 +21,10 @@ type
btnPopulateGrid: TButton; btnPopulateGrid: TButton;
CbShowHeaders: TCheckBox; CbShowHeaders: TCheckBox;
CbShowGridLines: TCheckBox; CbShowGridLines: TCheckBox;
EdFrozenRows: TSpinEdit;
ImageList1: TImageList; ImageList1: TImageList;
Label1: TLabel;
Label2: TLabel;
MainMenu1: TMainMenu; MainMenu1: TMainMenu;
MenuItem1: TMenuItem; MenuItem1: TMenuItem;
mnuFile: TMenuItem; mnuFile: TMenuItem;
@ -32,6 +35,7 @@ type
PageControl1: TPageControl; PageControl1: TPageControl;
Panel1: TPanel; Panel1: TPanel;
SaveDialog1: TSaveDialog; SaveDialog1: TSaveDialog;
EdFrozenCols: TSpinEdit;
sWorksheetGrid1: TsWorksheetGrid; sWorksheetGrid1: TsWorksheetGrid;
TabSheet1: TTabSheet; TabSheet1: TTabSheet;
ToolBar1: TToolBar; ToolBar1: TToolBar;
@ -45,6 +49,8 @@ type
procedure acOpenExecute(Sender: TObject); procedure acOpenExecute(Sender: TObject);
procedure acQuitExecute(Sender: TObject); procedure acQuitExecute(Sender: TObject);
procedure acSaveAsExecute(Sender: TObject); procedure acSaveAsExecute(Sender: TObject);
procedure EdFrozenColsChange(Sender: TObject);
procedure EdFrozenRowsChange(Sender: TObject);
procedure FormActivate(Sender: TObject); procedure FormActivate(Sender: TObject);
procedure PageControl1Change(Sender: TObject); procedure PageControl1Change(Sender: TObject);
private private
@ -118,6 +124,16 @@ begin
end; end;
end; end;
procedure TForm1.EdFrozenColsChange(Sender: TObject);
begin
sWorksheetGrid1.FrozenCols := EdFrozenCols.Value;
end;
procedure TForm1.EdFrozenRowsChange(Sender: TObject);
begin
sWorksheetGrid1.FrozenRows := EdFrozenRows.Value;
end;
procedure TForm1.FormActivate(Sender: TObject); procedure TForm1.FormActivate(Sender: TObject);
begin begin
if ParamCount > 0 then if ParamCount > 0 then
@ -130,13 +146,18 @@ var
pages: TStrings; pages: TStrings;
i: Integer; i: Integer;
begin begin
// Load file
sWorksheetGrid1.LoadFromSpreadsheetFile(AFileName); sWorksheetGrid1.LoadFromSpreadsheetFile(AFileName);
// Update user interface
Caption := Format('fpsGrid - %s (%s)', [ Caption := Format('fpsGrid - %s (%s)', [
AFilename, AFilename,
GetFileFormatName(sWorksheetGrid1.Workbook.FileFormat) GetFileFormatName(sWorksheetGrid1.Workbook.FileFormat)
]); ]);
CbShowGridLines.Checked := sWorksheetGrid1.Worksheet.ShowGridLines; CbShowGridLines.Checked := (soShowGridLines in sWorksheetGrid1.Worksheet.Options);
CbShowHeaders.Checked := sWorksheetGrid1.Worksheet.ShowHeaders; CbShowHeaders.Checked := (soShowHeaders in sWorksheetGrid1.Worksheet.Options);
EdFrozenCols.Value := sWorksheetGrid1.FrozenCols;
EdFrozenRows.Value := sWorksheetGrid1.FrozenRows;
// Create a tab in the pagecontrol for each worksheet contained in the workbook // Create a tab in the pagecontrol for each worksheet contained in the workbook
// This would be easer with a TTabControl. This has display issues, though. // This would be easer with a TTabControl. This has display issues, though.

View File

@ -302,6 +302,9 @@ type
PCol = ^TCol; PCol = ^TCol;
TsSheetOption = (soShowGridLines, soShowHeaders, soHasFrozenPanes, soSelected);
TsSheetOptions = set of TsSheetOption;
type type
TsCustomSpreadReader = class; TsCustomSpreadReader = class;
@ -316,9 +319,9 @@ type
FCells: TAvlTree; // Items are TCell FCells: TAvlTree; // Items are TCell
FCurrentNode: TAVLTreeNode; // For GetFirstCell and GetNextCell FCurrentNode: TAVLTreeNode; // For GetFirstCell and GetNextCell
FRows, FCols: TIndexedAVLTree; // This lists contain only rows or cols with styles different from the standard FRows, FCols: TIndexedAVLTree; // This lists contain only rows or cols with styles different from the standard
FShowGridLines: Boolean; FLeftPaneWidth: Integer;
FShowHeaders: Boolean; FTopPaneHeight: Integer;
FSelected: Boolean; FOptions: TsSheetOptions;
procedure RemoveCallback(data, arg: pointer); procedure RemoveCallback(data, arg: pointer);
public public
Name: string; Name: string;
@ -389,9 +392,9 @@ type
property Rows: TIndexedAVLTree read FRows; property Rows: TIndexedAVLTree read FRows;
property Workbook: TsWorkbook read FWorkbook; property Workbook: TsWorkbook read FWorkbook;
// These are properties to interface to fpspreadsheetgrid. // These are properties to interface to fpspreadsheetgrid.
property ShowGridLines: Boolean read FShowGridLines write FShowGridLines; property Options: TsSheetOptions read FOptions write FOptions;
property ShowHeaders: Boolean read FShowHeaders write FShowHeaders; property LeftPaneWidth: Integer read FLeftPaneWidth write FLeftPaneWidth;
property Selected: Boolean read FSelected write FSelected; property TopPaneHeight: Integer read FTopPaneHeight write FTopPaneHeight;
end; end;
{ TsWorkbook } { TsWorkbook }
@ -813,9 +816,7 @@ begin
FRows := TIndexedAVLTree.Create(@CompareRows); FRows := TIndexedAVLTree.Create(@CompareRows);
FCols := TIndexedAVLTree.Create(@CompareCols); FCols := TIndexedAVLTree.Create(@CompareCols);
FShowGridLines := true; FOptions := [soShowGridLines, soShowHeaders];
FShowHeaders := true;
FSelected := true;
end; end;
{@@ {@@

View File

@ -25,15 +25,20 @@ type
FWorkbook: TsWorkbook; FWorkbook: TsWorkbook;
FWorksheet: TsWorksheet; FWorksheet: TsWorksheet;
FHeaderCount: Integer; FHeaderCount: Integer;
FFrozenCols: Integer;
FFrozenRows: Integer;
function CalcAutoRowHeight(ARow: Integer): Integer; function CalcAutoRowHeight(ARow: Integer): Integer;
function CalcColWidth(AWidth: Single): Integer; function CalcColWidth(AWidth: Single): Integer;
function CalcRowHeight(AHeight: Single): Integer; function CalcRowHeight(AHeight: Single): Integer;
function GetShowGridLines: Boolean; function GetShowGridLines: Boolean;
function GetShowHeaders: Boolean; function GetShowHeaders: Boolean;
procedure SetFrozenCols(AValue: Integer);
procedure SetFrozenRows(AValue: Integer);
procedure SetShowGridLines(AValue: Boolean); procedure SetShowGridLines(AValue: Boolean);
procedure SetShowHeaders(AValue: Boolean); procedure SetShowHeaders(AValue: Boolean);
protected protected
{ Protected declarations } { Protected declarations }
procedure DefaultDrawCell(ACol, ARow: Integer; var ARect: TRect; AState: TGridDrawState); override;
procedure DoPrepareCanvas(ACol, ARow: Integer; AState: TGridDrawState); override; procedure DoPrepareCanvas(ACol, ARow: Integer; AState: TGridDrawState); override;
procedure DrawAllRows; override; procedure DrawAllRows; override;
procedure DrawTextInCell(ACol, ARow: Integer; ARect: TRect; AState: TGridDrawState); override; procedure DrawTextInCell(ACol, ARow: Integer; ARect: TRect; AState: TGridDrawState); override;
@ -42,6 +47,8 @@ type
procedure Loaded; override; procedure Loaded; override;
procedure Setup; procedure Setup;
property DisplayFixedColRow: Boolean read GetShowHeaders write SetShowHeaders default true; property DisplayFixedColRow: Boolean read GetShowHeaders write SetShowHeaders default true;
property FrozenCols: Integer read FFrozenCols write SetFrozenCols;
property FrozenRows: Integer read FFrozenRows write SetFrozenRows;
property ShowGridLines: Boolean read GetShowGridLines write SetShowGridLines default true; property ShowGridLines: Boolean read GetShowGridLines write SetShowGridLines default true;
property ShowHeaders: Boolean read GetShowHeaders write SetShowHeaders default true; property ShowHeaders: Boolean read GetShowHeaders write SetShowHeaders default true;
public public
@ -65,6 +72,8 @@ type
published published
// inherited from TsCustomWorksheetGrid // inherited from TsCustomWorksheetGrid
property DisplayFixedColRow; deprecated 'Use ShowHeaders'; property DisplayFixedColRow; deprecated 'Use ShowHeaders';
property FrozenCols;
property FrozenRows;
property ShowGridLines; property ShowGridLines;
property ShowHeaders; property ShowHeaders;
@ -305,6 +314,37 @@ begin
Result := round(AHeight / 25.4 * Screen.PixelsPerInch) + 4; Result := round(AHeight / 25.4 * Screen.PixelsPerInch) + 4;
end; end;
procedure TsCustomWorksheetGrid.DefaultDrawCell(aCol, aRow: Integer; var aRect: TRect;
AState: TGridDrawState);
var
wasFixed: Boolean;
begin
wasFixed := false;
if (gdFixed in AState) then
if ShowHeaders then begin
if ((ARow < FixedRows) and (ARow > 0) and (ACol > 0)) or
((ACol < FixedCols) and (ACol > 0) and (ARow > 0))
then
wasFixed := true;
end else begin
if (ARow < FixedRows) or (ACol < FixedCols) then
wasFixed := true;
end;
if wasFixed then begin
wasFixed := true;
AState := AState - [gdFixed];
Canvas.Brush.Color := clWindow;
end;
inherited DefaultDrawCell(ACol, ARow, ARect, AState);
if wasFixed then begin
DrawCellGrid(ACol, ARow, ARect, AState);
AState := AState + [gdFixed];
end;
end;
{ Adjusts the grid's canvas before painting a given cell. Considers, e.g. { Adjusts the grid's canvas before painting a given cell. Considers, e.g.
background color, horizontal alignment, vertical alignment, etc. } background color, horizontal alignment, vertical alignment, etc. }
procedure TsCustomWorksheetGrid.DoPrepareCanvas(ACol, ARow: Integer; procedure TsCustomWorksheetGrid.DoPrepareCanvas(ACol, ARow: Integer;
@ -372,6 +412,7 @@ begin
end; end;
end; end;
Canvas.TextStyle := ts; Canvas.TextStyle := ts;
inherited DoPrepareCanvas(ACol, ARow, AState); inherited DoPrepareCanvas(ACol, ARow, AState);
end; end;
@ -380,9 +421,9 @@ end;
procedure TsCustomWorksheetGrid.DrawAllRows; procedure TsCustomWorksheetGrid.DrawAllRows;
var var
cell: PCell; cell: PCell;
c, r: Integer; c, r, tmp: Integer;
rect: TRect; rect, cliprect: TRect;
headerRect: TRect; rgn: HRGN;
procedure DrawBorderLine(ACell: PCell; ARect: TRect; ABorder: TsCellBorder; procedure DrawBorderLine(ACell: PCell; ARect: TRect; ABorder: TsCellBorder;
ALineStyle: TsLineStyle); ALineStyle: TsLineStyle);
@ -397,7 +438,6 @@ var
($FFFFFFFF, $FFFFFFFF, $07070707, $AAAAAAAA, $FFFFFFFF, $FFFFFFFF); ($FFFFFFFF, $FFFFFFFF, $07070707, $AAAAAAAA, $FFFFFFFF, $FFFFFFFF);
var var
w: Integer; w: Integer;
r: TRect;
begin begin
if ALineStyle = lsDouble then if ALineStyle = lsDouble then
case ABorder of case ABorder of
@ -424,16 +464,11 @@ var
//Canvas.Pen.Pattern := PEN_PATTERNS[ACell^.BorderStyles[ABorder].LineStyle]; //Canvas.Pen.Pattern := PEN_PATTERNS[ACell^.BorderStyles[ABorder].LineStyle];
//Canvas.Pen.EndCap := pecSquare; //Canvas.Pen.EndCap := pecSquare;
if ARect.Bottom < headerRect.Bottom then exit;
r := ARect;
if ARect.Top < headerRect.Bottom then r.Top := headerRect.Bottom;
case ABorder of case ABorder of
cbEast : Canvas.Line(ARect.Right-1, r.Top, ARect.Right-1, ARect.Bottom-w); cbEast : Canvas.Line(ARect.Right-1, ARect.Top, ARect.Right-1, ARect.Bottom-w);
cbSouth: Canvas.Line(ARect.Left-1, ARect.Bottom-1, ARect.Right-w, ARect.Bottom-1); cbSouth: Canvas.Line(ARect.Left-1, ARect.Bottom-1, ARect.Right-w, ARect.Bottom-1);
cbWest : Canvas.Line(ARect.Left-1, r.Top, ARect.Left-1, ARect.Bottom-w); cbWest : Canvas.Line(ARect.Left-1, ARect.Top, ARect.Left-1, ARect.Bottom-w);
cbNorth: if ARect.Top >= headerRect.Bottom then cbNorth: Canvas.Line(ARect.Left-1, ARect.Top-1, ARect.Right-w, ARect.Top-1);
Canvas.Line(ARect.Left-1, ARect.Top-1, ARect.Right-w, ARect.Top-1);
end; end;
end; end;
end; end;
@ -442,27 +477,37 @@ begin
inherited; inherited;
if FWorksheet = nil then exit; if FWorksheet = nil then exit;
if (FHeaderCount > 0) then Canvas.SaveHandleState;
HeaderRect := CellRect(0, 0) try
else // Avoid painting into the fixed cells
HeaderRect := Classes.Rect(0, 0, 0, 0); cliprect := ClientRect;
if FixedCols > 0 then
ColRowToOffset(True, True, FixedCols-1, tmp, cliprect.Left);
if FixedRows > 0 then
ColRowToOffset(False, True, FixedRows-1, tmp, cliprect.Top);
rgn := CreateRectRgn(cliprect.Left, cliprect.top, cliprect.Right, cliprect.Bottom);
SelectClipRgn(Canvas.Handle, Rgn);
cell := FWorksheet.GetFirstCell; cell := FWorksheet.GetFirstCell;
while cell <> nil do begin while cell <> nil do begin
if (uffBorder in cell^.UsedFormattingFields) then begin if (uffBorder in cell^.UsedFormattingFields) then begin
c := cell^.Col + FHeaderCount; c := cell^.Col + FHeaderCount;
r := cell^.Row + FHeaderCount; r := cell^.Row + FHeaderCount;
rect := CellRect(c, r); rect := CellRect(c, r);
if (cbNorth in cell^.Border) then if (cbNorth in cell^.Border) then
DrawBorderLine(cell, rect, cbNorth, cell^.BorderStyles[cbNorth].LineStyle); DrawBorderLine(cell, rect, cbNorth, cell^.BorderStyles[cbNorth].LineStyle);
if cbEast in cell^.Border then if cbEast in cell^.Border then
DrawBorderLine(cell, rect, cbEast, cell^.BorderStyles[cbEast].LineStyle); DrawBorderLine(cell, rect, cbEast, cell^.BorderStyles[cbEast].LineStyle);
if cbSouth in cell^.Border then if cbSouth in cell^.Border then
DrawBorderLine(cell, rect, cbSouth, cell^.BorderStyles[cbSouth].LineStyle); DrawBorderLine(cell, rect, cbSouth, cell^.BorderStyles[cbSouth].LineStyle);
if cbWest in cell^.Border then if cbWest in cell^.Border then
DrawBorderLine(cell, rect, cbWest, cell^.BorderStyles[cbWest].LineStyle); DrawBorderLine(cell, rect, cbWest, cell^.BorderStyles[cbWest].LineStyle);
end;
cell := FWorksheet.GetNextCell;
end; end;
cell := FWorksheet.GetNextCell; DeleteObject(rgn);
finally
Canvas.RestoreHandleState;
end; end;
end; end;
@ -764,6 +809,18 @@ begin
Setup; Setup;
end; end;
procedure TsCustomWorksheetGrid.SetFrozenCols(AValue: Integer);
begin
FFrozenCols := AValue;
Setup;
end;
procedure TsCustomWorksheetGrid.SetFrozenRows(AValue: Integer);
begin
FFrozenRows := AValue;
Setup;
end;
procedure TsCustomWorksheetGrid.SetShowGridLines(AValue: Boolean); procedure TsCustomWorksheetGrid.SetShowGridLines(AValue: Boolean);
begin begin
if AValue = GetShowGridLines then Exit; if AValue = GetShowGridLines then Exit;
@ -785,6 +842,7 @@ var
i: Integer; i: Integer;
lCol: PCol; lCol: PCol;
lRow: PRow; lRow: PRow;
fc, fr: Integer;
begin begin
if (FWorksheet = nil) or (FWorksheet.GetCellCount = 0) then begin if (FWorksheet = nil) or (FWorksheet.GetCellCount = 0) then begin
if ShowHeaders then begin if ShowHeaders then begin
@ -800,13 +858,15 @@ begin
RowCount := 0; RowCount := 0;
end; end;
end else end else
if ShowHeaders then begin if FWorksheet <> nil then begin
ColCount := FWorksheet.GetLastColNumber + 2; ColCount := FWorksheet.GetLastColNumber + 1 + FHeaderCount;
RowCount := FWorksheet.GetLastRowNumber + 2; RowCount := FWorksheet.GetLastRowNumber + 1 + FHeaderCount;
FixedCols := 1; FixedCols := FFrozenCols + FHeaderCount;
FixedRows := 1; FixedRows := FFrozenRows + FHeaderCount;
ColWidths[0] := Canvas.TextWidth(' 999999 '); if ShowHeaders then begin
// Setup column widths ColWidths[0] := Canvas.TextWidth(' 999999 ');
RowHeights[0] := DefaultRowHeight;
end;
for i := FHeaderCount to ColCount-1 do begin for i := FHeaderCount to ColCount-1 do begin
lCol := FWorksheet.FindCol(i - FHeaderCount); lCol := FWorksheet.FindCol(i - FHeaderCount);
if (lCol <> nil) then if (lCol <> nil) then
@ -814,21 +874,6 @@ begin
else else
ColWidths[i] := DefaultColWidth; ColWidths[i] := DefaultColWidth;
end; end;
end else begin
ColCount := FWorksheet.GetLastColNumber + 1;
RowCount := FWorksheet.GetLastRowNumber + 1;
FixedCols := 0;
FixedRows := 0;
for i := 0 to ColCount-1 do begin
lCol := FWorksheet.FindCol(i);
if (lCol <> nil) then
ColWidths[i] := CalcColWidth(lCol^.Width)
else
ColWidths[i] := DefaultColWidth;
end;
end;
if FWorksheet <> nil then begin
RowHeights[0] := DefaultRowHeight;
for i := FHeaderCount to RowCount-1 do begin for i := FHeaderCount to RowCount-1 do begin
lRow := FWorksheet.FindRow(i - FHeaderCount); lRow := FWorksheet.FindRow(i - FHeaderCount);
if (lRow = nil) or lRow^.AutoHeight then if (lRow = nil) or lRow^.AutoHeight then
@ -836,20 +881,22 @@ begin
else else
RowHeights[i] := CalcRowHeight(lRow^.Height); RowHeights[i] := CalcRowHeight(lRow^.Height);
end; end;
end end;
else
for i:=0 to RowCount-1 do begin
RowHeights[i] := DefaultRowHeight;
end;
Invalidate;
end; end;
procedure TsCustomWorksheetGrid.LoadFromWorksheet(AWorksheet: TsWorksheet); procedure TsCustomWorksheetGrid.LoadFromWorksheet(AWorksheet: TsWorksheet);
begin begin
FWorksheet := AWorksheet; FWorksheet := AWorksheet;
if FWorksheet <> nil then begin if FWorksheet <> nil then begin
ShowHeaders := FWorksheet.ShowHeaders; ShowHeaders := (soShowHeaders in FWorksheet.Options);
ShowGridLines := FWorksheet.ShowGridLines; ShowGridLines := (soShowGridLines in FWorksheet.Options);
if (soHasFrozenPanes in FWorksheet.Options) then begin
FrozenCols := FWorksheet.LeftPaneWidth;
FrozenRows := FWorksheet.TopPaneHeight;
end else begin
FrozenCols := 0;
FrozenRows := 0;
end;
end; end;
Setup; Setup;
end; end;

View File

@ -64,6 +64,7 @@ type
procedure ShowNumberCell; procedure ShowNumberCell;
procedure ShowObj; procedure ShowObj;
procedure ShowPalette; procedure ShowPalette;
procedure ShowPane;
procedure ShowPassword; procedure ShowPassword;
procedure ShowPrecision; procedure ShowPrecision;
procedure ShowPrintGridLines; procedure ShowPrintGridLines;
@ -297,6 +298,8 @@ begin
ShowWindow2; ShowWindow2;
$0040: $0040:
ShowBackup; ShowBackup;
$0041:
ShowPane;
$0042: $0042:
ShowCodePage; ShowCodePage;
$0043: $0043:
@ -2345,6 +2348,42 @@ begin
end; end;
procedure TBIFFGrid.ShowPane;
var
numBytes: Integer;
w: Word;
b: Byte;
begin
RowCount := FixedRows + IfThen(FFormat < sfExcel5, 5, 6);
numBytes := 2;
Move(FBuffer[FBufferIndex], w, numBytes);
ShowInRow(FCurrRow, FBufferIndex, numBytes, IntToStr(WordLEToN(w)),
'Position of vertical split (twips or columns (if frozen))');
Move(FBuffer[FBufferIndex], w, numBytes);
ShowInRow(FCurrRow, FBUfferIndex, numBytes, IntToStr(WordLEToN(w)),
'Position of horizontal split (twips or rows (if frozen))');
Move(FBuffer[FBufferIndex], w, numBytes);
ShowInRow(FCurrRow, FBUfferIndex, numBytes, IntToStr(WordLEToN(w)),
'Index to first visible row in bottom pane(s)');
Move(FBuffer[FBufferIndex], w, numBytes);
ShowInRow(FCurrRow, FBUfferIndex, numBytes, IntToStr(WordLEToN(w)),
'Index to first visible column in right pane(s)');
numBytes := 1;
b := FBuffer[FBufferIndex];
ShowInRow(FCurrRow, FBUfferIndex, numBytes, IntToStr(b),
'Identifier of pane with active cell cursor');
if FFormat >= sfExcel5 then begin
b := FBuffer[FBufferIndex];
ShowInRow(FCurrRow, FBUfferIndex, numBytes, IntToStr(b), 'not used');
end;
end;
procedure TBIFFGrid.ShowPassword; procedure TBIFFGrid.ShowPassword;
var var
numBytes: Integer; numBytes: Integer;

View File

@ -60,6 +60,7 @@ type
procedure ReadNumber(AStream: TStream); override; procedure ReadNumber(AStream: TStream); override;
procedure ReadRowColXF(AStream: TStream; out ARow, ACol: Cardinal; out AXF: Word); override; procedure ReadRowColXF(AStream: TStream; out ARow, ACol: Cardinal; out AXF: Word); override;
procedure ReadRowInfo(AStream: TStream); override; procedure ReadRowInfo(AStream: TStream); override;
procedure ReadWindow2(AStream: TStream); override;
procedure ReadXF(AStream: TStream); procedure ReadXF(AStream: TStream);
public public
{ General reading methods } { General reading methods }
@ -88,6 +89,7 @@ type
AddBackground: Boolean = false); AddBackground: Boolean = false);
procedure WriteXFFieldsForFormattingStyles(AStream: TStream); procedure WriteXFFieldsForFormattingStyles(AStream: TStream);
procedure WriteXFRecords(AStream: TStream); procedure WriteXFRecords(AStream: TStream);
procedure WriteWindow2(AStream: TStream; ASheet: TsWorksheet);
protected protected
procedure WriteBlank(AStream: TStream; const ARow, ACol: Cardinal; ACell: PCell); override; procedure WriteBlank(AStream: TStream; const ARow, ACol: Cardinal; ACell: PCell); override;
procedure WriteRPNFormula(AStream: TStream; const ARow, ACol: Cardinal; const AFormula: TsRPNFormula; ACell: PCell); override; procedure WriteRPNFormula(AStream: TStream; const ARow, ACol: Cardinal; const AFormula: TsRPNFormula; ACell: PCell); override;
@ -143,6 +145,9 @@ var
implementation implementation
uses
Math;
const const
{ Excel record IDs } { Excel record IDs }
INT_EXCEL_ID_BLANK = $0001; INT_EXCEL_ID_BLANK = $0001;
@ -156,6 +161,7 @@ const
INT_EXCEL_ID_FORMAT = $001E; INT_EXCEL_ID_FORMAT = $001E;
INT_EXCEL_ID_FORMATCOUNT= $001F; INT_EXCEL_ID_FORMATCOUNT= $001F;
INT_EXCEL_ID_COLWIDTH = $0024; INT_EXCEL_ID_COLWIDTH = $0024;
INT_EXCEL_ID_WINDOW2 = $003E;
INT_EXCEL_ID_XF = $0043; INT_EXCEL_ID_XF = $0043;
INT_EXCEL_ID_IXFE = $0044; INT_EXCEL_ID_IXFE = $0044;
INT_EXCEL_ID_FONTCOLOR = $0045; INT_EXCEL_ID_FONTCOLOR = $0045;
@ -421,6 +427,8 @@ begin
INT_EXCEL_ID_FORMULA : ReadFormula(AStream); INT_EXCEL_ID_FORMULA : ReadFormula(AStream);
INT_EXCEL_ID_COLWIDTH : ReadColWidth(AStream); INT_EXCEL_ID_COLWIDTH : ReadColWidth(AStream);
INT_EXCEL_ID_ROWINFO : ReadRowInfo(AStream); INT_EXCEL_ID_ROWINFO : ReadRowInfo(AStream);
INT_EXCEL_ID_WINDOW2 : ReadWindow2(AStream);
INT_EXCEL_ID_PANE : ReadPane(AStream);
INT_EXCEL_ID_XF : ReadXF(AStream); INT_EXCEL_ID_XF : ReadXF(AStream);
INT_EXCEL_ID_BOF : ; INT_EXCEL_ID_BOF : ;
INT_EXCEL_ID_EOF : BIFF2EOF := True; INT_EXCEL_ID_EOF : BIFF2EOF := True;
@ -560,6 +568,51 @@ begin
lRow^.AutoHeight := true; lRow^.AutoHeight := true;
end; end;
{ Reads the WINDOW2 record containing information like "show grid lines",
"show sheet headers", "panes are frozen", etc. }
procedure TsSpreadBIFF2Reader.ReadWindow2(AStream: TStream);
var
b: byte;
w: Word;
rgb: DWord;
begin
// Show formulas, not results
b := AStream.ReadByte;
// Show grid lines
if AStream.ReadByte <> 0 then
FWorksheet.Options := FWorksheet.Options + [soShowGridLines]
else
FWorksheet.Options := FWorksheet.Options - [soShowGridLines];
// Show sheet headers
if AStream.ReadByte <> 0 then
FWorksheet.Options := FWorksheet.Options + [soShowHeaders]
else
FWorksheet.Options := FWorksheet.Options - [soShowHeaders];
// Panes are frozen
if AStream.ReadByte <> 0 then
FWorksheet.Options := FWorksheet.Options + [soHasFrozenPanes]
else
FWorksheet.Options := FWorksheet.Options - [soHasFrozenPanes];
// Show zero values
b := AStream.ReadByte;
// Index to first visible row
w := WordLEToN(AStream.ReadWord);
// Indoex to first visible column
w := WordLEToN(AStream.ReadWord);
// Use automatic grid line color (0= manual)
b := AStream.ReadByte;
// Manual grid line line color (rgb)
rgb := DWordToLE(AStream.ReadDWord);
end;
procedure TsSpreadBIFF2Reader.ReadXF(AStream: TStream); procedure TsSpreadBIFF2Reader.ReadXF(AStream: TStream);
{ Offset Size Contents { Offset Size Contents
0 1 Index to FONT record (➜5.45) 0 1 Index to FONT record (➜5.45)
@ -764,18 +817,67 @@ end;
so only the first will be written. so only the first will be written.
} }
procedure TsSpreadBIFF2Writer.WriteToStream(AStream: TStream); procedure TsSpreadBIFF2Writer.WriteToStream(AStream: TStream);
var
sheet: TsWorksheet;
begin begin
sheet := Workbook.GetFirstWorksheet;
WriteBOF(AStream); WriteBOF(AStream);
WriteFonts(AStream);
WriteFonts(AStream); WriteFormats(AStream);
WriteFormats(AStream); WriteXFRecords(AStream);
WriteXFRecords(AStream); WriteColWidths(AStream);
WriteColWidths(AStream); { -- currently not working
WriteCellsToStream(AStream, Workbook.GetFirstWorksheet.Cells); WriteWindow2(AStream, sheet);
WritePane(AStream, sheet, false); // false for "is not BIFF5 or BIFF8"
}
WriteCellsToStream(AStream, sheet.Cells);
WriteEOF(AStream); WriteEOF(AStream);
end; end;
{
Writes an Excel 2 WINDOW2 record
}
procedure TsSpreadBIFF2Writer.WriteWindow2(AStream: TStream;
ASheet: TsWorksheet);
var
b: Byte;
begin
{ BIFF Record header }
AStream.WriteWord(WordToLE(INT_EXCEL_ID_WINDOW2));
AStream.WriteWord(WordToLE(14));
{ Show formulas, not results }
AStream.WriteByte(0);
{ Show grid lines }
b := IfThen(soShowGridLines in ASheet.Options, 1, 0);
AStream.WriteByte(b);
{ Show sheet headers }
b := IfThen(soShowHeaders in ASheet.Options, 1, 0);
AStream.WriteByte(b);
{ Panes are frozen? }
b := IfThen(soHasFrozenPanes in ASheet.Options, 1, 0);
AStream.WriteByte(b);
{ Show zero values as zeros, not empty cells }
AStream.WriteByte(1);
{ Index to first visible row }
AStream.WriteWord(0);
{ Index to first visible column }
AStream.WriteWord(0);
{ Use automatic grid line color }
AStream.WriteByte(1);
{ RGB of manual grid line color }
AStream.WriteDWord(0);
end;
procedure TsSpreadBIFF2Writer.WriteXF(AStream: TStream; procedure TsSpreadBIFF2Writer.WriteXF(AStream: TStream;
AFontIndex, AFormatIndex: byte; ABorders: TsCellBorders = []; AFontIndex, AFormatIndex: byte; ABorders: TsCellBorders = [];
AHorAlign: TsHorAlignment = haLeft; AddBackground: Boolean = false); AHorAlign: TsHorAlignment = haLeft; AddBackground: Boolean = false);

View File

@ -412,6 +412,7 @@ begin
WriteColInfos(AStream, sheet); WriteColInfos(AStream, sheet);
WriteDimensions(AStream, sheet); WriteDimensions(AStream, sheet);
WriteWindow2(AStream, sheet); WriteWindow2(AStream, sheet);
WritePane(AStream, sheet, true); // true for "is BIFF5 or BIFF8"
WriteCellsToStream(AStream, sheet.Cells); WriteCellsToStream(AStream, sheet.Cells);
WriteEOF(AStream); WriteEOF(AStream);
end; end;
@ -1017,11 +1018,13 @@ begin
MASK_WINDOW2_OPTION_SHOW_OUTLINE_SYMBOLS or MASK_WINDOW2_OPTION_SHOW_OUTLINE_SYMBOLS or
MASK_WINDOW2_OPTION_SHEET_ACTIVE; MASK_WINDOW2_OPTION_SHEET_ACTIVE;
if ASheet.ShowGridLines then if (soShowGridLines in ASheet.Options) then
Options := Options or MASK_WINDOW2_OPTION_SHOW_GRID_LINES; Options := Options or MASK_WINDOW2_OPTION_SHOW_GRID_LINES;
if ASheet.ShowHeaders then if (soShowHeaders in ASheet.Options) then
Options := Options or MASK_WINDOW2_OPTION_SHOW_SHEET_HEADERS; Options := Options or MASK_WINDOW2_OPTION_SHOW_SHEET_HEADERS;
if ASheet.Selected then if (soHasFrozenPanes in ASheet.Options) then
Options := Options or MASK_WINDOW2_OPTION_PANES_ARE_FROZEN;
if (soSelected in ASheet.Options) then
Options := Options or MASK_WINDOW2_OPTION_SHEET_SELECTED; Options := Options or MASK_WINDOW2_OPTION_SHEET_SELECTED;
AStream.WriteWord(WordToLE(Options)); AStream.WriteWord(WordToLE(Options));
@ -1033,7 +1036,7 @@ begin
AStream.WriteWord(WordToLE(0)); AStream.WriteWord(WordToLE(0));
{ Grid line RGB colour } { Grid line RGB colour }
AStream.WriteDWord(WordToLE(0)); AStream.WriteDWord(DWordToLE(0));
end; end;
{******************************************************************* {*******************************************************************
@ -1332,18 +1335,19 @@ begin
case RecordType of case RecordType of
INT_EXCEL_ID_BLANK: ReadBlank(AStream); INT_EXCEL_ID_BLANK : ReadBlank(AStream);
INT_EXCEL_ID_NUMBER: ReadNumber(AStream); INT_EXCEL_ID_NUMBER : ReadNumber(AStream);
INT_EXCEL_ID_LABEL: ReadLabel(AStream); INT_EXCEL_ID_LABEL : ReadLabel(AStream);
INT_EXCEL_ID_RSTRING: ReadRichString(AStream); //(RSTRING) This record stores a formatted text cell (Rich-Text). In BIFF8 it is usually replaced by the LABELSST record. Excel still uses this record, if it copies formatted text cells to the clipboard. INT_EXCEL_ID_RSTRING : ReadRichString(AStream); //(RSTRING) This record stores a formatted text cell (Rich-Text). In BIFF8 it is usually replaced by the LABELSST record. Excel still uses this record, if it copies formatted text cells to the clipboard.
INT_EXCEL_ID_RK: ReadRKValue(AStream); //(RK) This record represents a cell that contains an RK value (encoded integer or floating-point value). If a floating-point value cannot be encoded to an RK value, a NUMBER record will be written. This record replaces the record INTEGER written in BIFF2. INT_EXCEL_ID_RK : ReadRKValue(AStream); //(RK) This record represents a cell that contains an RK value (encoded integer or floating-point value). If a floating-point value cannot be encoded to an RK value, a NUMBER record will be written. This record replaces the record INTEGER written in BIFF2.
INT_EXCEL_ID_MULRK: ReadMulRKValues(AStream); INT_EXCEL_ID_MULRK : ReadMulRKValues(AStream);
INT_EXCEL_ID_COLINFO: ReadColInfo(AStream); INT_EXCEL_ID_COLINFO : ReadColInfo(AStream);
INT_EXCEL_ID_ROWINFO: ReadRowInfo(AStream); INT_EXCEL_ID_ROWINFO : ReadRowInfo(AStream);
INT_EXCEL_ID_FORMULA: ReadFormulaExcel(AStream); INT_EXCEL_ID_FORMULA : ReadFormulaExcel(AStream);
INT_EXCEL_ID_WINDOW2: ReadWindow2(AStream); INT_EXCEL_ID_WINDOW2 : ReadWindow2(AStream);
INT_EXCEL_ID_BOF: ; INT_EXCEL_ID_PANE : ReadPane(AStream);
INT_EXCEL_ID_EOF: SectionEOF := True; INT_EXCEL_ID_BOF : ;
INT_EXCEL_ID_EOF : SectionEOF := True;
// Show unsupported record types to console. // Show unsupported record types to console.
{.$DEFINE SHOWUNSUPPORTED} {.$DEFINE SHOWUNSUPPORTED}
{$IFDEF SHOWUNSUPPORTED} {$IFDEF SHOWUNSUPPORTED}

View File

@ -501,8 +501,9 @@ begin
WriteIndex(AStream); WriteIndex(AStream);
WriteColInfos(AStream, sheet); WriteColInfos(AStream, sheet);
WriteDimensions(AStream, sheet); WriteDimensions(AStream, sheet);
WriteWindow2(AStream, sheet);
WriteCellsToStream(AStream, sheet.Cells); WriteCellsToStream(AStream, sheet.Cells);
WriteWindow2(AStream, sheet);
WritePane(AStream, sheet, true); // true for "is BIFF5 or BIFF8"
WriteEOF(AStream); WriteEOF(AStream);
end; end;
@ -1187,11 +1188,13 @@ begin
MASK_WINDOW2_OPTION_SHOW_OUTLINE_SYMBOLS or MASK_WINDOW2_OPTION_SHOW_OUTLINE_SYMBOLS or
MASK_WINDOW2_OPTION_SHEET_ACTIVE; MASK_WINDOW2_OPTION_SHEET_ACTIVE;
if ASheet.ShowGridLines then if (soShowGridLines in ASheet.Options) then
Options := Options or MASK_WINDOW2_OPTION_SHOW_GRID_LINES; Options := Options or MASK_WINDOW2_OPTION_SHOW_GRID_LINES;
if ASheet.ShowHeaders then if (soShowHeaders in ASheet.Options) then
Options := Options or MASK_WINDOW2_OPTION_SHOW_SHEET_HEADERS; Options := Options or MASK_WINDOW2_OPTION_SHOW_SHEET_HEADERS;
if ASheet.Selected then if (soHasFrozenPanes in ASheet.Options) then
Options := Options or MASK_WINDOW2_OPTION_PANES_ARE_FROZEN;
if (soSelected in ASheet.Options) then
Options := Options or MASK_WINDOW2_OPTION_SHEET_SELECTED; Options := Options or MASK_WINDOW2_OPTION_SHEET_SELECTED;
AStream.WriteWord(WordToLE(Options)); AStream.WriteWord(WordToLE(Options));
@ -1575,26 +1578,27 @@ begin
case RecordType of case RecordType of
INT_EXCEL_ID_BLANK: ReadBlank(AStream); INT_EXCEL_ID_BLANK : ReadBlank(AStream);
INT_EXCEL_ID_NUMBER: ReadNumber(AStream); INT_EXCEL_ID_NUMBER : ReadNumber(AStream);
INT_EXCEL_ID_LABEL: ReadLabel(AStream); INT_EXCEL_ID_LABEL : ReadLabel(AStream);
INT_EXCEL_ID_FORMULA: ReadFormula(AStream); INT_EXCEL_ID_FORMULA : ReadFormula(AStream);
//(RSTRING) This record stores a formatted text cell (Rich-Text). //(RSTRING) This record stores a formatted text cell (Rich-Text).
// In BIFF8 it is usually replaced by the LABELSST record. Excel still // In BIFF8 it is usually replaced by the LABELSST record. Excel still
// uses this record, if it copies formatted text cells to the clipboard. // uses this record, if it copies formatted text cells to the clipboard.
INT_EXCEL_ID_RSTRING: ReadRichString(AStream); INT_EXCEL_ID_RSTRING : ReadRichString(AStream);
// (RK) This record represents a cell that contains an RK value // (RK) This record represents a cell that contains an RK value
// (encoded integer or floating-point value). If a floating-point // (encoded integer or floating-point value). If a floating-point
// value cannot be encoded to an RK value, a NUMBER record will be written. // value cannot be encoded to an RK value, a NUMBER record will be written.
// This record replaces the record INTEGER written in BIFF2. // This record replaces the record INTEGER written in BIFF2.
INT_EXCEL_ID_RK: ReadRKValue(AStream); INT_EXCEL_ID_RK : ReadRKValue(AStream);
INT_EXCEL_ID_MULRK: ReadMulRKValues(AStream); INT_EXCEL_ID_MULRK : ReadMulRKValues(AStream);
INT_EXCEL_ID_LABELSST:ReadLabelSST(AStream); //BIFF8 only INT_EXCEL_ID_LABELSST: ReadLabelSST(AStream); //BIFF8 only
INT_EXCEL_ID_COLINFO: ReadColInfo(AStream); INT_EXCEL_ID_COLINFO : ReadColInfo(AStream);
INT_EXCEL_ID_ROWINFO: ReadRowInfo(AStream); INT_EXCEL_ID_ROWINFO : ReadRowInfo(AStream);
INT_EXCEL_ID_WINDOW2: ReadWindow2(AStream); INT_EXCEL_ID_WINDOW2 : ReadWindow2(AStream);
INT_EXCEL_ID_BOF: ; INT_EXCEL_ID_PANE : ReadPane(AStream);
INT_EXCEL_ID_EOF: SectionEOF := True; INT_EXCEL_ID_BOF : ;
INT_EXCEL_ID_EOF : SectionEOF := True;
else else
// nothing // nothing
end; end;

View File

@ -17,6 +17,7 @@ uses
const const
{ RECORD IDs which didn't change across versions 2-8 } { RECORD IDs which didn't change across versions 2-8 }
INT_EXCEL_ID_FONT = $0031; INT_EXCEL_ID_FONT = $0031;
INT_EXCEL_ID_PANE = $0041;
INT_EXCEL_ID_CODEPAGE = $0042; INT_EXCEL_ID_CODEPAGE = $0042;
INT_EXCEL_ID_COLINFO = $007D; INT_EXCEL_ID_COLINFO = $007D;
INT_EXCEL_ID_DATEMODE = $0022; INT_EXCEL_ID_DATEMODE = $0022;
@ -368,6 +369,8 @@ type
procedure ReadNumber(AStream: TStream); override; procedure ReadNumber(AStream: TStream); override;
// Read palette // Read palette
procedure ReadPalette(AStream: TStream); procedure ReadPalette(AStream: TStream);
// Read PANE record
procedure ReadPane(AStream: TStream);
// Read the row, column, and XF index at the current stream position // Read the row, column, and XF index at the current stream position
procedure ReadRowColXF(AStream: TStream; out ARow, ACol: Cardinal; out AXF: Word); virtual; procedure ReadRowColXF(AStream: TStream; out ARow, ACol: Cardinal; out AXF: Word); virtual;
// Read row info // Read row info
@ -411,6 +414,8 @@ type
const AValue: Double; ACell: PCell); override; const AValue: Double; ACell: PCell); override;
// Writes out a PALETTE record containing all colors defined in the workbook // Writes out a PALETTE record containing all colors defined in the workbook
procedure WritePalette(AStream: TStream); procedure WritePalette(AStream: TStream);
// Writes out a PANE record
procedure WritePane(AStream: TStream; ASheet: TsWorksheet; IsBiff58: Boolean);
// Writes the index of the XF record used in the given cell // Writes the index of the XF record used in the given cell
procedure WriteXFIndex(AStream: TStream; ACell: PCell); procedure WriteXFIndex(AStream: TStream; ACell: PCell);
@ -845,6 +850,28 @@ begin
FPaletteFound := true; FPaletteFound := true;
end; end;
{ Read pane sizes
Valid for all BIFF versions }
procedure TsSpreadBIFFReader.ReadPane(AStream: TStream);
begin
{ Position of horizontal split:
- Unfrozen pane: Width of the left pane(s) (in twips = 1/20 of a point)
- Frozen pane: Number of visible columns in left pane(s) }
FWorksheet.LeftPaneWidth := WordLEToN(AStream.ReadWord);
{ Position of vertical split:
- Unfrozen pane: Height of the top pane(s) (in twips = 1/20 of a point)
- Frozen pane: Number of visible rows in top pane(s) }
FWorksheet.TopPaneHeight := WordLEToN(AStream.ReadWord);
{ There's more information which is not supported here:
Offset Size Description
4 2 Index to first visible row in bottom pane(s)
6 2 Index to first visible column in right pane(s)
8 1 Identifier of pane with active cell cursor (see below)
[9] 1 Not used (BIFF5-BIFF8 only, not written in BIFF2-BIFF4) }
end;
// Read the row, column and xf index // Read the row, column and xf index
// NOT VALID for BIFF2 // NOT VALID for BIFF2
procedure TsSpreadBIFFReader.ReadRowColXF(AStream: TStream; procedure TsSpreadBIFFReader.ReadRowColXF(AStream: TStream;
@ -888,8 +915,8 @@ begin
// changed manually. // changed manually.
end; end;
{ Reads the WINDOW2 record containing information like "show grid lines", or { Reads the WINDOW2 record containing information like "show grid lines",
"show sheet headers". "show sheet headers", "panes are frozen", etc.
The record structure is different for BIFF5 and BIFF8, but we use here only The record structure is different for BIFF5 and BIFF8, but we use here only
the common part. the common part.
BIFF2 is completely different and has to be overridden. } BIFF2 is completely different and has to be overridden. }
@ -898,9 +925,26 @@ var
flags: Word; flags: Word;
begin begin
flags := WordLEToN(AStream.ReadWord); flags := WordLEToN(AStream.ReadWord);
FWorksheet.ShowGridLines := (flags and MASK_WINDOW2_OPTION_SHOW_GRID_LINES <> 0);
FWorksheet.ShowHeaders := (flags and MASK_WINDOW2_OPTION_SHOW_SHEET_HEADERS <> 0); if (flags and MASK_WINDOW2_OPTION_SHOW_GRID_LINES <> 0) then
FWorksheet.Selected := (flags and MASK_WINDOW2_OPTION_SHEET_SELECTED <> 0); FWorksheet.Options := FWorksheet.Options + [soShowGridLines]
else
FWorksheet.Options := FWorksheet.Options - [soShowGridLines];
if (flags and MASK_WINDOW2_OPTION_SHOW_SHEET_HEADERS <> 0) then
FWorksheet.Options := FWorksheet.Options + [soShowHeaders]
else
FWorksheet.Options := FWorksheet.Options - [soShowHeaders];
if (flags and MASK_WINDOW2_OPTION_SHEET_SELECTED <> 0) then
FWorksheet.Options := FWorksheet.Options + [soSelected]
else
FWorksheet.Options := FWorksheet.Options - [soSelected];
if (flags and MASK_WINDOW2_OPTION_PANES_ARE_FROZEN <> 0) then
FWorksheet.Options := FWorksheet.Options + [soHasFrozenPanes]
else
FWorksheet.Options := FWorksheet.Options - [soHasFrozenPanes];
end; end;
@ -1283,6 +1327,70 @@ begin
AStream.WriteDWord(DWordToLE($FFFFFF)); AStream.WriteDWord(DWordToLE($FFFFFF));
end; end;
{ Writes a PANE record to the stream.
Valid for all BIFF versions. The difference for BIFF5-BIFF8 is a non-used
byte at the end. Activate IsBiff58 in these cases. }
procedure TsSpreadBIFFWriter.WritePane(AStream: TStream; ASheet: TsWorksheet;
IsBiff58: Boolean);
var
n: Word;
active_pane: Byte;
begin
if (ASheet.LeftPaneWidth = 0) and (ASheet.TopPaneHeight = 0) then
exit;
if not (soHasFrozenPanes in ASheet.Options) then
exit;
{ Non-frozen panes should work in principle, but they are not read without
error. They possibly require an additional SELECTION record. }
{ BIFF record header }
AStream.WriteWord(WordToLE(INT_EXCEL_ID_PANE));
if isBIFF58 then n := 10 else n := 9;
AStream.WriteWord(WordToLE(n));
{ Position of the vertical split (px, 0 = No vertical split):
- Unfrozen pane: Width of the left pane(s) (in twips = 1/20 of a point)
- Frozen pane: Number of visible columns in left pane(s) }
AStream.WriteWord(WordToLE(ASheet.LeftPaneWidth));
{ Position of the horizontal split (py, 0 = No horizontal split):
- Unfrozen pane: Height of the top pane(s) (in twips = 1/20 of a point)
- Frozen pane: Number of visible rows in top pane(s) }
AStream.WriteWord(WordToLE(ASheet.TopPaneHeight));
{ Index to first visible row in bottom pane(s) }
if (soHasFrozenPanes in ASheet.Options) then
AStream.WriteWord(WordToLE(ASheet.TopPaneHeight))
else
AStream.WriteWord(WordToLE(0));
{ Index to first visible column in right pane(s) }
if (soHasFrozenPanes in ASheet.Options) then
AStream.WriteWord(WordToLE(ASheet.LeftPaneWidth))
else
AStream.WriteWord(WordToLE(0));
{ Identifier of pane with active cell cursor }
if (soHasFrozenPanes in ASheet.Options) then begin
if (ASheet.LeftPaneWidth = 0) and (ASheet.TopPaneHeight = 0) then
active_pane := 3
else
if (ASheet.LeftPaneWidth = 0) then
active_pane := 2
else
if (ASheet.TopPaneHeight =0) then
active_pane := 1
else
active_pane := 0;
end else
active_pane := 0;
AStream.WriteByte(active_pane);
if IsBIFF58 then
AStream.WriteByte(0);
{ Not used (BIFF5-BIFF8 only, not written in BIFF2-BIFF4 }
end;
{ Write the index of the XF record, according to formatting of the given cell { Write the index of the XF record, according to formatting of the given cell
Valid for BIFF5 and BIFF8. Valid for BIFF5 and BIFF8.