fpspreadsheet: Add properties for direct cell font access by TsWorksheetGrid.

git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3040 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
wp_xxyyzz
2014-05-11 16:16:59 +00:00
parent a954d389c0
commit 07824c46c1
6 changed files with 2187 additions and 1853 deletions

View File

@ -107,7 +107,7 @@
<PackageName Value="LCL"/> <PackageName Value="LCL"/>
</Item2> </Item2>
</RequiredPackages> </RequiredPackages>
<Units Count="55"> <Units Count="57">
<Unit0> <Unit0>
<Filename Value="fpsgrid.lpr"/> <Filename Value="fpsgrid.lpr"/>
<IsPartOfProject Value="True"/> <IsPartOfProject Value="True"/>
@ -126,36 +126,36 @@
<HasResources Value="True"/> <HasResources Value="True"/>
<ResourceBaseClass Value="Form"/> <ResourceBaseClass Value="Form"/>
<UnitName Value="mainform"/> <UnitName Value="mainform"/>
<IsVisibleTab Value="True"/>
<EditorIndex Value="1"/> <EditorIndex Value="1"/>
<WindowIndex Value="0"/> <WindowIndex Value="0"/>
<TopLine Value="526"/> <TopLine Value="309"/>
<CursorPos X="48" Y="557"/> <CursorPos X="18" Y="327"/>
<UsageCount Value="200"/> <UsageCount Value="200"/>
<Bookmarks Count="1">
<Item0 X="3" Y="558" ID="1"/>
</Bookmarks>
<Loaded Value="True"/> <Loaded Value="True"/>
<LoadedDesigner Value="True"/> <LoadedDesigner Value="True"/>
</Unit1> </Unit1>
<Unit2> <Unit2>
<Filename Value="..\..\fpspreadsheet.pas"/> <Filename Value="..\..\fpspreadsheet.pas"/>
<UnitName Value="fpspreadsheet"/> <UnitName Value="fpspreadsheet"/>
<EditorIndex Value="5"/> <EditorIndex Value="8"/>
<WindowIndex Value="0"/> <WindowIndex Value="0"/>
<TopLine Value="187"/> <TopLine Value="2255"/>
<CursorPos X="10" Y="186"/> <CursorPos X="19" Y="2262"/>
<UsageCount Value="99"/> <UsageCount Value="100"/>
<Loaded Value="True"/> <Loaded Value="True"/>
</Unit2> </Unit2>
<Unit3> <Unit3>
<Filename Value="..\..\fpspreadsheetgrid.pas"/> <Filename Value="..\..\fpspreadsheetgrid.pas"/>
<UnitName Value="fpspreadsheetgrid"/> <UnitName Value="fpspreadsheetgrid"/>
<EditorIndex Value="4"/> <IsVisibleTab Value="True"/>
<EditorIndex Value="6"/>
<WindowIndex Value="0"/> <WindowIndex Value="0"/>
<TopLine Value="1142"/> <TopLine Value="2007"/>
<CursorPos X="19" Y="1161"/> <CursorPos X="1" Y="1983"/>
<UsageCount Value="100"/> <UsageCount Value="100"/>
<Bookmarks Count="1">
<Item0 X="7" Y="1938" ID="1"/>
</Bookmarks>
<Loaded Value="True"/> <Loaded Value="True"/>
</Unit3> </Unit3>
<Unit4> <Unit4>
@ -164,7 +164,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="7"/> <UsageCount Value="6"/>
</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"/>
@ -172,7 +172,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="7"/> <UsageCount Value="6"/>
</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"/>
@ -180,7 +180,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="7"/> <UsageCount Value="6"/>
</Unit6> </Unit6>
<Unit7> <Unit7>
<Filename Value="c:\Lazarus\lcl\grids.pas"/> <Filename Value="c:\Lazarus\lcl\grids.pas"/>
@ -188,14 +188,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="7"/> <UsageCount Value="6"/>
</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="7"/> <UsageCount Value="6"/>
</Unit8> </Unit8>
<Unit9> <Unit9>
<Filename Value="..\..\fpsallformats.pas"/> <Filename Value="..\..\fpsallformats.pas"/>
@ -203,7 +203,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="7"/> <UsageCount Value="6"/>
</Unit9> </Unit9>
<Unit10> <Unit10>
<Filename Value="..\..\wikitable.pas"/> <Filename Value="..\..\wikitable.pas"/>
@ -211,7 +211,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="13"/> <UsageCount Value="12"/>
</Unit10> </Unit10>
<Unit11> <Unit11>
<Filename Value="..\..\fpsopendocument.pas"/> <Filename Value="..\..\fpsopendocument.pas"/>
@ -219,15 +219,17 @@
<WindowIndex Value="0"/> <WindowIndex Value="0"/>
<TopLine Value="1"/> <TopLine Value="1"/>
<CursorPos X="1" Y="1"/> <CursorPos X="1" Y="1"/>
<UsageCount Value="9"/> <UsageCount Value="8"/>
</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="2"/>
<WindowIndex Value="0"/> <WindowIndex Value="0"/>
<TopLine Value="6924"/> <TopLine Value="2464"/>
<CursorPos X="20" Y="6956"/> <CursorPos X="1" Y="2495"/>
<UsageCount Value="46"/> <UsageCount Value="48"/>
<Loaded Value="True"/>
</Unit12> </Unit12>
<Unit13> <Unit13>
<Filename Value="..\..\fpsutils.pas"/> <Filename Value="..\..\fpsutils.pas"/>
@ -235,23 +237,23 @@
<WindowIndex Value="0"/> <WindowIndex Value="0"/>
<TopLine Value="35"/> <TopLine Value="35"/>
<CursorPos X="1" Y="62"/> <CursorPos X="1" Y="62"/>
<UsageCount Value="48"/> <UsageCount Value="47"/>
</Unit13> </Unit13>
<Unit14> <Unit14>
<Filename Value="d:\lazarus-svn\lcl\include\canvas.inc"/> <Filename Value="d:\lazarus-svn\lcl\include\canvas.inc"/>
<WindowIndex Value="0"/> <WindowIndex Value="0"/>
<TopLine Value="1212"/> <TopLine Value="1212"/>
<CursorPos X="3" Y="1218"/> <CursorPos X="3" Y="1218"/>
<UsageCount Value="5"/> <UsageCount Value="4"/>
</Unit14> </Unit14>
<Unit15> <Unit15>
<Filename Value="d:\lazarus-svn\lcl\graphics.pp"/> <Filename Value="d:\lazarus-svn\lcl\graphics.pp"/>
<UnitName Value="Graphics"/> <UnitName Value="Graphics"/>
<EditorIndex Value="3"/> <EditorIndex Value="5"/>
<WindowIndex Value="0"/> <WindowIndex Value="0"/>
<TopLine Value="1937"/> <TopLine Value="1937"/>
<CursorPos X="11" Y="1956"/> <CursorPos X="11" Y="1956"/>
<UsageCount Value="30"/> <UsageCount Value="33"/>
<Loaded Value="True"/> <Loaded Value="True"/>
</Unit15> </Unit15>
<Unit16> <Unit16>
@ -259,16 +261,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="13"/> <UsageCount Value="12"/>
</Unit16> </Unit16>
<Unit17> <Unit17>
<Filename Value="..\..\xlsbiff8.pas"/> <Filename Value="..\..\xlsbiff8.pas"/>
<UnitName Value="xlsbiff8"/> <UnitName Value="xlsbiff8"/>
<EditorIndex Value="7"/> <EditorIndex Value="10"/>
<WindowIndex Value="0"/> <WindowIndex Value="0"/>
<TopLine Value="2008"/> <TopLine Value="2010"/>
<CursorPos X="39" Y="1983"/> <CursorPos X="39" Y="1983"/>
<UsageCount Value="74"/> <UsageCount Value="77"/>
<Loaded Value="True"/> <Loaded Value="True"/>
</Unit17> </Unit17>
<Unit18> <Unit18>
@ -277,43 +279,43 @@
<WindowIndex Value="0"/> <WindowIndex Value="0"/>
<TopLine Value="1091"/> <TopLine Value="1091"/>
<CursorPos X="12" Y="1122"/> <CursorPos X="12" Y="1122"/>
<UsageCount Value="9"/> <UsageCount Value="8"/>
</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="7"/> <UsageCount Value="6"/>
</Unit19> </Unit19>
<Unit20> <Unit20>
<Filename Value="..\..\xlscommon.pas"/> <Filename Value="..\..\xlscommon.pas"/>
<UnitName Value="xlscommon"/> <UnitName Value="xlscommon"/>
<EditorIndex Value="6"/> <EditorIndex Value="9"/>
<WindowIndex Value="0"/> <WindowIndex Value="0"/>
<TopLine Value="1461"/> <TopLine Value="1461"/>
<CursorPos X="43" Y="1479"/> <CursorPos X="43" Y="1479"/>
<UsageCount Value="70"/> <UsageCount Value="73"/>
<Loaded Value="True"/> <Loaded Value="True"/>
</Unit20> </Unit20>
<Unit21> <Unit21>
<Filename Value="..\..\xlsbiff5.pas"/> <Filename Value="..\..\xlsbiff5.pas"/>
<UnitName Value="xlsbiff5"/> <UnitName Value="xlsbiff5"/>
<EditorIndex Value="8"/> <EditorIndex Value="11"/>
<WindowIndex Value="0"/> <WindowIndex Value="0"/>
<TopLine Value="1"/> <TopLine Value="1"/>
<CursorPos X="1" Y="1"/> <CursorPos X="1" Y="1"/>
<UsageCount Value="57"/> <UsageCount Value="60"/>
<Loaded Value="True"/> <Loaded Value="True"/>
</Unit21> </Unit21>
<Unit22> <Unit22>
<Filename Value="..\..\xlsbiff2.pas"/> <Filename Value="..\..\xlsbiff2.pas"/>
<UnitName Value="xlsbiff2"/> <UnitName Value="xlsbiff2"/>
<EditorIndex Value="9"/> <EditorIndex Value="12"/>
<WindowIndex Value="0"/> <WindowIndex Value="0"/>
<TopLine Value="547"/> <TopLine Value="547"/>
<CursorPos X="1" Y="563"/> <CursorPos X="1" Y="563"/>
<UsageCount Value="58"/> <UsageCount Value="61"/>
<Loaded Value="True"/> <Loaded Value="True"/>
</Unit22> </Unit22>
<Unit23> <Unit23>
@ -322,7 +324,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="2"/> <UsageCount Value="1"/>
</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"/>
@ -330,7 +332,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="14"/>
</Unit24> </Unit24>
<Unit25> <Unit25>
<Filename Value="d:\lazarus-svn\fpc\2.6.2\source\packages\fcl-image\src\fpimage.pp"/> <Filename Value="d:\lazarus-svn\fpc\2.6.2\source\packages\fcl-image\src\fpimage.pp"/>
@ -338,14 +340,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="3"/> <UsageCount Value="2"/>
</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="11"/> <UsageCount Value="10"/>
</Unit26> </Unit26>
<Unit27> <Unit27>
<Filename Value="d:\Prog_Delphi\common\units\XLS.pas"/> <Filename Value="d:\Prog_Delphi\common\units\XLS.pas"/>
@ -353,14 +355,14 @@
<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="10"/>
</Unit27> </Unit27>
<Unit28> <Unit28>
<Filename Value="d:\lazarus-svn\lcl\include\pen.inc"/> <Filename Value="d:\lazarus-svn\lcl\include\pen.inc"/>
<WindowIndex Value="0"/> <WindowIndex Value="0"/>
<TopLine Value="354"/> <TopLine Value="354"/>
<CursorPos X="1" Y="385"/> <CursorPos X="1" Y="385"/>
<UsageCount Value="16"/> <UsageCount Value="15"/>
</Unit28> </Unit28>
<Unit29> <Unit29>
<Filename Value="d:\lazarus-svn\lcl\controls.pp"/> <Filename Value="d:\lazarus-svn\lcl\controls.pp"/>
@ -368,14 +370,14 @@
<WindowIndex Value="0"/> <WindowIndex Value="0"/>
<TopLine Value="2222"/> <TopLine Value="2222"/>
<CursorPos X="14" Y="2242"/> <CursorPos X="14" Y="2242"/>
<UsageCount Value="11"/> <UsageCount Value="10"/>
</Unit29> </Unit29>
<Unit30> <Unit30>
<Filename Value="d:\lazarus-svn\lcl\include\control.inc"/> <Filename Value="d:\lazarus-svn\lcl\include\control.inc"/>
<WindowIndex Value="0"/> <WindowIndex Value="0"/>
<TopLine Value="4129"/> <TopLine Value="4129"/>
<CursorPos X="1" Y="4161"/> <CursorPos X="1" Y="4161"/>
<UsageCount Value="10"/> <UsageCount Value="9"/>
</Unit30> </Unit30>
<Unit31> <Unit31>
<Filename Value="..\..\fpspreadsheetchart.pas"/> <Filename Value="..\..\fpspreadsheetchart.pas"/>
@ -383,7 +385,7 @@
<WindowIndex Value="0"/> <WindowIndex Value="0"/>
<TopLine Value="170"/> <TopLine Value="170"/>
<CursorPos X="37" Y="204"/> <CursorPos X="37" Y="204"/>
<UsageCount Value="6"/> <UsageCount Value="5"/>
</Unit31> </Unit31>
<Unit32> <Unit32>
<Filename Value="d:\lazarus-svn\components\lazutils\lazutf8.pas"/> <Filename Value="d:\lazarus-svn\components\lazutils\lazutf8.pas"/>
@ -391,16 +393,16 @@
<WindowIndex Value="0"/> <WindowIndex Value="0"/>
<TopLine Value="3180"/> <TopLine Value="3180"/>
<CursorPos X="1" Y="3212"/> <CursorPos X="1" Y="3212"/>
<UsageCount Value="7"/> <UsageCount Value="6"/>
</Unit32> </Unit32>
<Unit33> <Unit33>
<Filename Value="d:\lazarus-svn\lcl\colorbox.pas"/> <Filename Value="d:\lazarus-svn\lcl\colorbox.pas"/>
<UnitName Value="ColorBox"/> <UnitName Value="ColorBox"/>
<EditorIndex Value="2"/> <EditorIndex Value="4"/>
<WindowIndex Value="0"/> <WindowIndex Value="0"/>
<TopLine Value="584"/> <TopLine Value="584"/>
<CursorPos X="3" Y="598"/> <CursorPos X="3" Y="598"/>
<UsageCount Value="11"/> <UsageCount Value="14"/>
<Loaded Value="True"/> <Loaded Value="True"/>
</Unit33> </Unit33>
<Unit34> <Unit34>
@ -409,7 +411,7 @@
<WindowIndex Value="0"/> <WindowIndex Value="0"/>
<TopLine Value="222"/> <TopLine Value="222"/>
<CursorPos X="3" Y="253"/> <CursorPos X="3" Y="253"/>
<UsageCount Value="7"/> <UsageCount Value="6"/>
</Unit34> </Unit34>
<Unit35> <Unit35>
<Filename Value="d:\lazarus-svn\lcl\forms.pp"/> <Filename Value="d:\lazarus-svn\lcl\forms.pp"/>
@ -417,7 +419,7 @@
<WindowIndex Value="0"/> <WindowIndex Value="0"/>
<TopLine Value="932"/> <TopLine Value="932"/>
<CursorPos X="3" Y="939"/> <CursorPos X="3" Y="939"/>
<UsageCount Value="7"/> <UsageCount Value="6"/>
</Unit35> </Unit35>
<Unit36> <Unit36>
<Filename Value="C:\development\lazarus\lcl\graphics.pp"/> <Filename Value="C:\development\lazarus\lcl\graphics.pp"/>
@ -425,7 +427,7 @@
<WindowIndex Value="0"/> <WindowIndex Value="0"/>
<TopLine Value="2053"/> <TopLine Value="2053"/>
<CursorPos X="30" Y="1945"/> <CursorPos X="30" Y="1945"/>
<UsageCount Value="10"/> <UsageCount Value="9"/>
</Unit36> </Unit36>
<Unit37> <Unit37>
<Filename Value="C:\development\fpc\packages\fcl-image\src\fpcanvas.pp"/> <Filename Value="C:\development\fpc\packages\fcl-image\src\fpcanvas.pp"/>
@ -433,14 +435,14 @@
<WindowIndex Value="0"/> <WindowIndex Value="0"/>
<TopLine Value="89"/> <TopLine Value="89"/>
<CursorPos X="15" Y="97"/> <CursorPos X="15" Y="97"/>
<UsageCount Value="9"/> <UsageCount Value="8"/>
</Unit37> </Unit37>
<Unit38> <Unit38>
<Filename Value="C:\development\fpc\packages\fcl-image\src\fpfont.inc"/> <Filename Value="C:\development\fpc\packages\fcl-image\src\fpfont.inc"/>
<WindowIndex Value="0"/> <WindowIndex Value="0"/>
<TopLine Value="54"/> <TopLine Value="54"/>
<CursorPos X="3" Y="57"/> <CursorPos X="3" Y="57"/>
<UsageCount Value="9"/> <UsageCount Value="8"/>
</Unit38> </Unit38>
<Unit39> <Unit39>
<Filename Value="C:\development\lazarus\lcl\graphmath.pp"/> <Filename Value="C:\development\lazarus\lcl\graphmath.pp"/>
@ -448,7 +450,7 @@
<WindowIndex Value="0"/> <WindowIndex Value="0"/>
<TopLine Value="584"/> <TopLine Value="584"/>
<CursorPos X="3" Y="439"/> <CursorPos X="3" Y="439"/>
<UsageCount Value="9"/> <UsageCount Value="8"/>
</Unit39> </Unit39>
<Unit40> <Unit40>
<Filename Value="C:\development\lazarus\lcl\graphtype.pp"/> <Filename Value="C:\development\lazarus\lcl\graphtype.pp"/>
@ -456,7 +458,7 @@
<WindowIndex Value="0"/> <WindowIndex Value="0"/>
<TopLine Value="234"/> <TopLine Value="234"/>
<CursorPos X="3" Y="33"/> <CursorPos X="3" Y="33"/>
<UsageCount Value="9"/> <UsageCount Value="8"/>
</Unit40> </Unit40>
<Unit41> <Unit41>
<Filename Value="C:\development\lazarus\lcl\lcltype.pp"/> <Filename Value="C:\development\lazarus\lcl\lcltype.pp"/>
@ -464,7 +466,7 @@
<WindowIndex Value="0"/> <WindowIndex Value="0"/>
<TopLine Value="1628"/> <TopLine Value="1628"/>
<CursorPos X="3" Y="1643"/> <CursorPos X="3" Y="1643"/>
<UsageCount Value="9"/> <UsageCount Value="8"/>
</Unit41> </Unit41>
<Unit42> <Unit42>
<Filename Value="C:\development\lazarus\lcl\graphutil.pp"/> <Filename Value="C:\development\lazarus\lcl\graphutil.pp"/>
@ -472,7 +474,7 @@
<WindowIndex Value="0"/> <WindowIndex Value="0"/>
<TopLine Value="128"/> <TopLine Value="128"/>
<CursorPos X="12" Y="143"/> <CursorPos X="12" Y="143"/>
<UsageCount Value="9"/> <UsageCount Value="8"/>
</Unit42> </Unit42>
<Unit43> <Unit43>
<Filename Value="C:\development\fpc\rtl\objpas\math.pp"/> <Filename Value="C:\development\fpc\rtl\objpas\math.pp"/>
@ -480,14 +482,14 @@
<WindowIndex Value="0"/> <WindowIndex Value="0"/>
<TopLine Value="144"/> <TopLine Value="144"/>
<CursorPos X="10" Y="159"/> <CursorPos X="10" Y="159"/>
<UsageCount Value="12"/> <UsageCount Value="11"/>
</Unit43> </Unit43>
<Unit44> <Unit44>
<Filename Value="C:\development\fpc\rtl\i386\i386.inc"/> <Filename Value="C:\development\fpc\rtl\i386\i386.inc"/>
<WindowIndex Value="0"/> <WindowIndex Value="0"/>
<TopLine Value="1551"/> <TopLine Value="1551"/>
<CursorPos X="3" Y="1563"/> <CursorPos X="3" Y="1563"/>
<UsageCount Value="10"/> <UsageCount Value="9"/>
</Unit44> </Unit44>
<Unit45> <Unit45>
<Filename Value="C:\development\lazarus\lcl\grids.pas"/> <Filename Value="C:\development\lazarus\lcl\grids.pas"/>
@ -495,7 +497,7 @@
<WindowIndex Value="0"/> <WindowIndex Value="0"/>
<TopLine Value="794"/> <TopLine Value="794"/>
<CursorPos X="15" Y="1010"/> <CursorPos X="15" Y="1010"/>
<UsageCount Value="16"/> <UsageCount Value="15"/>
</Unit45> </Unit45>
<Unit46> <Unit46>
<Filename Value="..\..\..\spktoolbar\SpkGraphTools\SpkGraphTools.pas"/> <Filename Value="..\..\..\spktoolbar\SpkGraphTools\SpkGraphTools.pas"/>
@ -503,185 +505,203 @@
<WindowIndex Value="0"/> <WindowIndex Value="0"/>
<TopLine Value="136"/> <TopLine Value="136"/>
<CursorPos X="1" Y="143"/> <CursorPos X="1" Y="143"/>
<UsageCount Value="7"/> <UsageCount Value="6"/>
</Unit46> </Unit46>
<Unit47> <Unit47>
<Filename Value="C:\development\fpc\rtl\objpas\classes\lists.inc"/> <Filename Value="C:\development\fpc\rtl\objpas\classes\lists.inc"/>
<WindowIndex Value="0"/> <WindowIndex Value="0"/>
<TopLine Value="34"/> <TopLine Value="34"/>
<CursorPos X="1" Y="49"/> <CursorPos X="1" Y="49"/>
<UsageCount Value="15"/> <UsageCount Value="14"/>
</Unit47> </Unit47>
<Unit48> <Unit48>
<Filename Value="C:\development\lazarus\lcl\include\canvas.inc"/> <Filename Value="C:\development\lazarus\lcl\include\canvas.inc"/>
<WindowIndex Value="0"/> <WindowIndex Value="0"/>
<TopLine Value="1705"/> <TopLine Value="1705"/>
<CursorPos X="1" Y="1720"/> <CursorPos X="1" Y="1720"/>
<UsageCount Value="15"/> <UsageCount Value="14"/>
</Unit48> </Unit48>
<Unit49> <Unit49>
<Filename Value="C:\development\lazarus\lcl\include\font.inc"/> <Filename Value="C:\development\lazarus\lcl\include\font.inc"/>
<WindowIndex Value="0"/> <WindowIndex Value="0"/>
<TopLine Value="1139"/> <TopLine Value="1139"/>
<CursorPos X="25" Y="1161"/> <CursorPos X="25" Y="1161"/>
<UsageCount Value="15"/> <UsageCount Value="14"/>
</Unit49> </Unit49>
<Unit50> <Unit50>
<Filename Value="C:\development\lazarus\lcl\include\winapih.inc"/> <Filename Value="C:\development\lazarus\lcl\include\winapih.inc"/>
<WindowIndex Value="0"/> <WindowIndex Value="0"/>
<TopLine Value="156"/> <TopLine Value="156"/>
<CursorPos X="10" Y="171"/> <CursorPos X="10" Y="171"/>
<UsageCount Value="9"/> <UsageCount Value="8"/>
</Unit50> </Unit50>
<Unit51> <Unit51>
<Filename Value="C:\development\lazarus\lcl\include\intfbasewinapi.inc"/> <Filename Value="C:\development\lazarus\lcl\include\intfbasewinapi.inc"/>
<WindowIndex Value="0"/> <WindowIndex Value="0"/>
<TopLine Value="1577"/> <TopLine Value="1577"/>
<CursorPos X="3" Y="1579"/> <CursorPos X="3" Y="1579"/>
<UsageCount Value="9"/> <UsageCount Value="8"/>
</Unit51> </Unit51>
<Unit52> <Unit52>
<Filename Value="C:\development\fpc\rtl\inc\except.inc"/> <Filename Value="C:\development\fpc\rtl\inc\except.inc"/>
<WindowIndex Value="0"/> <WindowIndex Value="0"/>
<TopLine Value="202"/> <TopLine Value="202"/>
<CursorPos X="1" Y="227"/> <CursorPos X="1" Y="227"/>
<UsageCount Value="9"/> <UsageCount Value="8"/>
</Unit52> </Unit52>
<Unit53> <Unit53>
<Filename Value="d:\lazarus-svn\lcl\include\menuitem.inc"/> <Filename Value="d:\lazarus-svn\lcl\include\menuitem.inc"/>
<WindowIndex Value="0"/> <WindowIndex Value="0"/>
<TopLine Value="69"/> <TopLine Value="69"/>
<CursorPos X="28" Y="82"/> <CursorPos X="28" Y="82"/>
<UsageCount Value="15"/> <UsageCount Value="14"/>
</Unit53> </Unit53>
<Unit54> <Unit54>
<Filename Value="d:\lazarus-svn\lcl\include\application.inc"/> <Filename Value="d:\lazarus-svn\lcl\include\application.inc"/>
<WindowIndex Value="0"/> <WindowIndex Value="0"/>
<TopLine Value="1371"/> <TopLine Value="1371"/>
<CursorPos X="1" Y="1390"/> <CursorPos X="1" Y="1390"/>
<UsageCount Value="14"/> <UsageCount Value="13"/>
</Unit54> </Unit54>
<Unit55>
<Filename Value="d:\lazarus-svn\lcl\include\font.inc"/>
<EditorIndex Value="3"/>
<WindowIndex Value="0"/>
<TopLine Value="648"/>
<CursorPos X="1" Y="675"/>
<UsageCount Value="12"/>
<Loaded Value="True"/>
</Unit55>
<Unit56>
<Filename Value="d:\lazarus-svn\lcl\include\fontdialog.inc"/>
<EditorIndex Value="7"/>
<WindowIndex Value="0"/>
<TopLine Value="24"/>
<CursorPos X="1" Y="49"/>
<UsageCount Value="12"/>
<Loaded Value="True"/>
</Unit56>
</Units> </Units>
<JumpHistory Count="30" HistoryIndex="29"> <JumpHistory Count="30" HistoryIndex="29">
<Position1> <Position1>
<Filename Value="d:\lazarus-svn\lcl\colorbox.pas"/> <Filename Value="..\..\fpspreadsheetgrid.pas"/>
<Caret Line="610" Column="15" TopLine="578"/> <Caret Line="1360" Column="1" TopLine="1335"/>
</Position1> </Position1>
<Position2> <Position2>
<Filename Value="mainform.pas"/> <Filename Value="..\..\fpspreadsheetgrid.pas"/>
<Caret Line="435" Column="32" TopLine="420"/> <Caret Line="1361" Column="1" TopLine="1335"/>
</Position2> </Position2>
<Position3> <Position3>
<Filename Value="..\..\fpspreadsheetgrid.pas"/> <Filename Value="..\..\fpspreadsheetgrid.pas"/>
<Caret Line="140" Column="14" TopLine="121"/> <Caret Line="1362" Column="1" TopLine="1335"/>
</Position3> </Position3>
<Position4> <Position4>
<Filename Value="d:\lazarus-svn\lcl\colorbox.pas"/> <Filename Value="..\..\fpspreadsheetgrid.pas"/>
<Caret Line="589" Column="28" TopLine="589"/> <Caret Line="1363" Column="1" TopLine="1335"/>
</Position4> </Position4>
<Position5> <Position5>
<Filename Value="d:\lazarus-svn\lcl\colorbox.pas"/> <Filename Value="..\..\fpspreadsheetgrid.pas"/>
<Caret Line="1" Column="1" TopLine="1"/> <Caret Line="1368" Column="1" TopLine="1336"/>
</Position5> </Position5>
<Position6> <Position6>
<Filename Value="d:\lazarus-svn\lcl\colorbox.pas"/> <Filename Value="mainform.pas"/>
<Caret Line="61" Column="27" TopLine="29"/> <Caret Line="610" Column="1" TopLine="602"/>
</Position6> </Position6>
<Position7> <Position7>
<Filename Value="d:\lazarus-svn\lcl\colorbox.pas"/> <Filename Value="mainform.pas"/>
<Caret Line="169" Column="27" TopLine="137"/> <Caret Line="613" Column="1" TopLine="602"/>
</Position7> </Position7>
<Position8> <Position8>
<Filename Value="d:\lazarus-svn\lcl\colorbox.pas"/> <Filename Value="mainform.pas"/>
<Caret Line="365" Column="15" TopLine="333"/> <Caret Line="603" Column="19" TopLine="603"/>
</Position8> </Position8>
<Position9> <Position9>
<Filename Value="d:\lazarus-svn\lcl\colorbox.pas"/> <Filename Value="mainform.pas"/>
<Caret Line="463" Column="17" TopLine="431"/> <Caret Line="310" Column="3" TopLine="310"/>
</Position9> </Position9>
<Position10> <Position10>
<Filename Value="d:\lazarus-svn\lcl\colorbox.pas"/> <Filename Value="mainform.pas"/>
<Caret Line="573" Column="41" TopLine="573"/> <Caret Line="1" Column="1" TopLine="1"/>
</Position10> </Position10>
<Position11> <Position11>
<Filename Value="d:\lazarus-svn\lcl\colorbox.pas"/> <Filename Value="mainform.pas"/>
<Caret Line="1" Column="1" TopLine="1"/> <Caret Line="173" Column="29" TopLine="142"/>
</Position11> </Position11>
<Position12> <Position12>
<Filename Value="d:\lazarus-svn\lcl\colorbox.pas"/> <Filename Value="mainform.pas"/>
<Caret Line="61" Column="27" TopLine="29"/> <Caret Line="556" Column="17" TopLine="524"/>
</Position12> </Position12>
<Position13> <Position13>
<Filename Value="d:\lazarus-svn\lcl\colorbox.pas"/> <Filename Value="..\..\fpspreadsheetgrid.pas"/>
<Caret Line="169" Column="27" TopLine="137"/> <Caret Line="2038" Column="1" TopLine="2031"/>
</Position13> </Position13>
<Position14> <Position14>
<Filename Value="d:\lazarus-svn\lcl\colorbox.pas"/> <Filename Value="..\..\fpspreadsheetgrid.pas"/>
<Caret Line="365" Column="15" TopLine="333"/> <Caret Line="2041" Column="1" TopLine="2031"/>
</Position14> </Position14>
<Position15> <Position15>
<Filename Value="d:\lazarus-svn\lcl\colorbox.pas"/> <Filename Value="..\..\fpspreadsheetgrid.pas"/>
<Caret Line="463" Column="17" TopLine="431"/> <Caret Line="2044" Column="1" TopLine="2031"/>
</Position15> </Position15>
<Position16> <Position16>
<Filename Value="mainform.pas"/> <Filename Value="d:\lazarus-svn\lcl\grids.pas"/>
<Caret Line="420" Column="4" TopLine="420"/> <Caret Line="2483" Column="1" TopLine="2464"/>
</Position16> </Position16>
<Position17> <Position17>
<Filename Value="..\..\fpspreadsheetgrid.pas"/> <Filename Value="d:\lazarus-svn\lcl\grids.pas"/>
<Caret Line="140" Column="14" TopLine="121"/> <Caret Line="2484" Column="1" TopLine="2464"/>
</Position17> </Position17>
<Position18> <Position18>
<Filename Value="..\..\fpspreadsheetgrid.pas"/> <Filename Value="d:\lazarus-svn\lcl\grids.pas"/>
<Caret Line="1161" Column="24" TopLine="1143"/> <Caret Line="2485" Column="1" TopLine="2464"/>
</Position18> </Position18>
<Position19> <Position19>
<Filename Value="..\..\fpspreadsheet.pas"/> <Filename Value="d:\lazarus-svn\lcl\grids.pas"/>
<Caret Line="447" Column="3" TopLine="447"/> <Caret Line="2486" Column="1" TopLine="2464"/>
</Position19> </Position19>
<Position20> <Position20>
<Filename Value="..\..\fpspreadsheet.pas"/> <Filename Value="d:\lazarus-svn\lcl\grids.pas"/>
<Caret Line="1" Column="1" TopLine="1"/> <Caret Line="2490" Column="1" TopLine="2464"/>
</Position20> </Position20>
<Position21> <Position21>
<Filename Value="..\..\fpspreadsheetgrid.pas"/> <Filename Value="d:\lazarus-svn\lcl\grids.pas"/>
<Caret Line="1161" Column="24" TopLine="1142"/> <Caret Line="2492" Column="1" TopLine="2464"/>
</Position21> </Position21>
<Position22> <Position22>
<Filename Value="mainform.pas"/> <Filename Value="d:\lazarus-svn\lcl\grids.pas"/>
<Caret Line="562" Column="28" TopLine="552"/> <Caret Line="2494" Column="1" TopLine="2464"/>
</Position22> </Position22>
<Position23> <Position23>
<Filename Value="mainform.pas"/> <Filename Value="d:\lazarus-svn\lcl\grids.pas"/>
<Caret Line="433" Column="14" TopLine="417"/> <Caret Line="2495" Column="1" TopLine="2464"/>
</Position23> </Position23>
<Position24> <Position24>
<Filename Value="mainform.pas"/> <Filename Value="..\..\fpspreadsheetgrid.pas"/>
<Caret Line="438" Column="30" TopLine="419"/> <Caret Line="2038" Column="1" TopLine="2031"/>
</Position24> </Position24>
<Position25> <Position25>
<Filename Value="mainform.pas"/> <Filename Value="..\..\fpspreadsheetgrid.pas"/>
<Caret Line="439" Column="29" TopLine="420"/> <Caret Line="1626" Column="1" TopLine="1607"/>
</Position25> </Position25>
<Position26> <Position26>
<Filename Value="mainform.pas"/> <Filename Value="..\..\fpspreadsheet.pas"/>
<Caret Line="440" Column="23" TopLine="421"/> <Caret Line="414" Column="14" TopLine="397"/>
</Position26> </Position26>
<Position27> <Position27>
<Filename Value="mainform.pas"/> <Filename Value="mainform.pas"/>
<Caret Line="439" Column="60" TopLine="420"/> <Caret Line="564" Column="1" TopLine="557"/>
</Position27> </Position27>
<Position28> <Position28>
<Filename Value="mainform.pas"/> <Filename Value="mainform.pas"/>
<Caret Line="589" Column="26" TopLine="571"/> <Caret Line="640" Column="31" TopLine="604"/>
</Position28> </Position28>
<Position29> <Position29>
<Filename Value="mainform.pas"/> <Filename Value="mainform.pas"/>
<Caret Line="557" Column="3" TopLine="522"/> <Caret Line="641" Column="31" TopLine="605"/>
</Position29> </Position29>
<Position30> <Position30>
<Filename Value="mainform.pas"/> <Filename Value="mainform.pas"/>
<Caret Line="165" Column="77" TopLine="134"/> <Caret Line="640" Column="31" TopLine="604"/>
</Position30> </Position30>
</JumpHistory> </JumpHistory>
</ProjectOptions> </ProjectOptions>

View File

@ -169,22 +169,22 @@ object Form1: TForm1
Images = ImageList1 Images = ImageList1
TabOrder = 3 TabOrder = 3
object ToolButton10: TToolButton object ToolButton10: TToolButton
Left = 273 Left = 296
Top = 2 Top = 2
Action = AcLeftAlign Action = AcLeftAlign
end end
object ToolButton12: TToolButton object ToolButton12: TToolButton
Left = 296 Left = 319
Top = 2 Top = 2
Action = AcHorCenterAlign Action = AcHorCenterAlign
end end
object ToolButton13: TToolButton object ToolButton13: TToolButton
Left = 319 Left = 342
Top = 2 Top = 2
Action = AcRightAlign Action = AcRightAlign
end end
object FontComboBox: TComboBox object FontComboBox: TComboBox
Left = 1 Left = 24
Height = 23 Height = 23
Top = 2 Top = 2
Width = 127 Width = 127
@ -193,7 +193,7 @@ object Form1: TForm1
TabOrder = 0 TabOrder = 0
end end
object FontSizeComboBox: TComboBox object FontSizeComboBox: TComboBox
Left = 128 Left = 151
Height = 23 Height = 23
Top = 2 Top = 2
Width = 48 Width = 48
@ -210,82 +210,75 @@ object Form1: TForm1
'20' '20'
'24' '24'
) )
OnSelect = FontComboBoxSelect OnSelect = FontSizeComboBoxSelect
TabOrder = 1 TabOrder = 1
end end
object ToolButton7: TToolButton object ToolButton7: TToolButton
Left = 176 Left = 199
Top = 2 Top = 2
Action = AcFontBold Action = AcFontBold
end end
object ToolButton8: TToolButton object ToolButton8: TToolButton
Left = 199 Left = 222
Top = 2 Top = 2
Action = AcFontItalic Action = AcFontItalic
end end
object ToolButton9: TToolButton object ToolButton9: TToolButton
Left = 222 Left = 245
Top = 2 Top = 2
Action = AcFontUnderline Action = AcFontUnderline
end end
object ToolButton11: TToolButton object ToolButton11: TToolButton
Left = 245 Left = 268
Top = 2 Top = 2
Action = AcFontStrikeout Action = AcFontStrikeout
end end
object ToolButton14: TToolButton object ToolButton14: TToolButton
Left = 268 Left = 291
Top = 2 Top = 2
Width = 5 Width = 5
Caption = 'ToolButton14' Caption = 'ToolButton14'
Style = tbsDivider Style = tbsDivider
end end
object ToolButton15: TToolButton object ToolButton15: TToolButton
Left = 342 Left = 365
Top = 2 Top = 2
Width = 5 Width = 5
Caption = 'ToolButton15' Caption = 'ToolButton15'
Style = tbsDivider Style = tbsDivider
end end
object ToolButton16: TToolButton object ToolButton16: TToolButton
Left = 347 Left = 370
Top = 2 Top = 2
Action = AcVAlignTop Action = AcVAlignTop
end end
object ToolButton17: TToolButton object ToolButton17: TToolButton
Left = 370 Left = 393
Top = 2 Top = 2
Action = AcVAlignCenter Action = AcVAlignCenter
end end
object ToolButton18: TToolButton object ToolButton18: TToolButton
Left = 393 Left = 416
Top = 2 Top = 2
Action = AcVAlignBottom Action = AcVAlignBottom
end end
object ToolButton19: TToolButton object ToolButton19: TToolButton
Left = 416 Left = 439
Top = 2 Top = 2
Width = 5 Width = 5
Caption = 'ToolButton19' Caption = 'ToolButton19'
Style = tbsDivider Style = tbsDivider
end end
object TbBorders: TToolButton object TbBorders: TToolButton
Left = 421 Left = 444
Top = 2 Top = 2
Action = AcBorderNone Action = AcBorderNone
DropdownMenu = BordersPopupMenu DropdownMenu = BordersPopupMenu
Style = tbsDropDown Style = tbsDropDown
end end
object ToolButton20: TToolButton
Left = 456
Top = 2
Width = 5
Caption = 'ToolButton20'
Style = tbsDivider
end
object CbBackgroundColor: TColorBox object CbBackgroundColor: TColorBox
Left = 461 Left = 479
Height = 24 Height = 22
Top = 2 Top = 2
Width = 132 Width = 132
Style = [cbPrettyNames, cbCustomColors] Style = [cbPrettyNames, cbCustomColors]
@ -294,6 +287,11 @@ object Form1: TForm1
OnSelect = CbBackgroundColorSelect OnSelect = CbBackgroundColorSelect
TabOrder = 2 TabOrder = 2
end end
object ToolButton21: TToolButton
Left = 1
Top = 2
Action = AcFont
end
end end
object OpenDialog1: TOpenDialog object OpenDialog1: TOpenDialog
DefaultExt = '.xls' DefaultExt = '.xls'
@ -1842,7 +1840,6 @@ object Form1: TForm1
OnExecute = AcFontStyleExecute OnExecute = AcFontStyleExecute
end end
object AcFontItalic: TAction object AcFontItalic: TAction
Tag = 1
Category = 'Format' Category = 'Format'
AutoCheck = True AutoCheck = True
Caption = 'Italic' Caption = 'Italic'
@ -1851,7 +1848,6 @@ object Form1: TForm1
OnExecute = AcFontStyleExecute OnExecute = AcFontStyleExecute
end end
object AcFontStrikeout: TAction object AcFontStrikeout: TAction
Tag = 2
Category = 'Format' Category = 'Format'
AutoCheck = True AutoCheck = True
Caption = 'Strike out' Caption = 'Strike out'
@ -1860,7 +1856,7 @@ object Form1: TForm1
OnExecute = AcFontStyleExecute OnExecute = AcFontStyleExecute
end end
object AcFontUnderline: TAction object AcFontUnderline: TAction
Tag = 3 Tag = 9
Category = 'Format' Category = 'Format'
AutoCheck = True AutoCheck = True
Caption = 'Underline' Caption = 'Underline'

File diff suppressed because it is too large Load Diff

View File

@ -134,7 +134,7 @@ type
ToolButton19: TToolButton; ToolButton19: TToolButton;
ToolButton2: TToolButton; ToolButton2: TToolButton;
TbBorders: TToolButton; TbBorders: TToolButton;
ToolButton20: TToolButton; ToolButton21: TToolButton;
ToolButton3: TToolButton; ToolButton3: TToolButton;
ToolButton4: TToolButton; ToolButton4: TToolButton;
ToolButton5: TToolButton; ToolButton5: TToolButton;
@ -147,19 +147,20 @@ type
procedure AcFontExecute(Sender: TObject); procedure AcFontExecute(Sender: TObject);
procedure AcFontStyleExecute(Sender: TObject); procedure AcFontStyleExecute(Sender: TObject);
procedure AcHorAlignmentExecute(Sender: TObject); procedure AcHorAlignmentExecute(Sender: TObject);
procedure AcOpenExecute(Sender: TObject);
procedure AcQuitExecute(Sender: TObject);
procedure AcSaveAsExecute(Sender: TObject);
procedure AcTextRotationExecute(Sender: TObject); procedure AcTextRotationExecute(Sender: TObject);
procedure AcVertAlignmentExecute(Sender: TObject); procedure AcVertAlignmentExecute(Sender: TObject);
procedure AcWordwrapExecute(Sender: TObject); procedure AcWordwrapExecute(Sender: TObject);
procedure CbBackgroundColorSelect(Sender: TObject); procedure CbBackgroundColorSelect(Sender: TObject);
procedure CbShowHeadersClick(Sender: TObject); procedure CbShowHeadersClick(Sender: TObject);
procedure CbShowGridLinesClick(Sender: TObject); procedure CbShowGridLinesClick(Sender: TObject);
procedure AcOpenExecute(Sender: TObject);
procedure AcQuitExecute(Sender: TObject);
procedure AcSaveAsExecute(Sender: TObject);
procedure CbBackgroundColorGetColors(Sender: TCustomColorBox; Items: TStrings); procedure CbBackgroundColorGetColors(Sender: TCustomColorBox; Items: TStrings);
procedure EdFrozenColsChange(Sender: TObject); procedure EdFrozenColsChange(Sender: TObject);
procedure EdFrozenRowsChange(Sender: TObject); procedure EdFrozenRowsChange(Sender: TObject);
procedure FontComboBoxSelect(Sender: TObject); procedure FontComboBoxSelect(Sender: TObject);
procedure FontSizeComboBoxSelect(Sender: TObject);
procedure FormActivate(Sender: TObject); procedure FormActivate(Sender: TObject);
procedure FormCreate(Sender: TObject); procedure FormCreate(Sender: TObject);
procedure PageControl1Change(Sender: TObject); procedure PageControl1Change(Sender: TObject);
@ -169,7 +170,9 @@ type
procedure LoadFile(const AFileName: String); procedure LoadFile(const AFileName: String);
procedure SetupBackgroundColorBox; procedure SetupBackgroundColorBox;
procedure UpdateBackgroundColorIndex; procedure UpdateBackgroundColorIndex;
procedure UpdateFontActions(AFont: TsFont); procedure UpdateFontNameIndex;
procedure UpdateFontSizeIndex;
procedure UpdateFontStyleActions;
procedure UpdateHorAlignmentActions; procedure UpdateHorAlignmentActions;
procedure UpdateTextRotationActions; procedure UpdateTextRotationActions;
procedure UpdateVertAlignmentActions; procedure UpdateVertAlignmentActions;
@ -208,7 +211,7 @@ const
BOTTOM_BORDER_MASK = $7000; BOTTOM_BORDER_MASK = $7000;
LR_INNER_BORDER = $0008; LR_INNER_BORDER = $0008;
TB_INNER_BORDER = $0800; TB_INNER_BORDER = $0800;
// Use a combination of these bits for the "Tag" of the Border actions. // Use a combination of these bits for the "Tag" of the Border actions - see FormCreate.
{ TForm1 } { TForm1 }
@ -304,56 +307,31 @@ begin
end; end;
end; end;
{ Changes the font of the selected cell by calling a standard font dialog. { Changes the font of the selected cell by calling a standard font dialog. }
Note that the worksheet's and grid's fonts are implemented differently.
In particular, the worksheet's font color is an index into the workbook's
palette while the grid's font color is an rgb value. }
procedure TForm1.AcFontExecute(Sender: TObject); procedure TForm1.AcFontExecute(Sender: TObject);
var
r,c: Cardinal;
f: Integer;
style: TsFontStyles;
lFont: TsFont;
begin begin
with sWorksheetGrid1 do begin with sWorksheetGrid1 do begin
if Worksheet <> nil then begin if Workbook = nil then
c := GetWorksheetCol(Col); exit;
r := GetWorksheetRow(Row); FontDialog1.Font := CellFonts[Selection];
f := Worksheet.GetCell(r, c)^.FontIndex; if FontDialog1.Execute then
Convert_sFont_to_Font(Workbook.GetFont(f), FontDialog1.Font); CellFonts[Selection] := FontDialog1.Font;
if FontDialog1.Execute then begin
lFont := TsFont.Create;
try
Convert_Font_to_sFont(FontDialog1.Font, lFont);
WorkSheet.WriteFont(r, c, lFont.FontName, lFont.Size, lFont.Style, lFont.Color);
finally
lFont.Free;
end;
end;
end;
end; end;
end; end;
procedure TForm1.AcFontStyleExecute(Sender: TObject); procedure TForm1.AcFontStyleExecute(Sender: TObject);
var var
style: TsFontstyles; style: TsFontstyles;
f: Integer;
r,c: Cardinal;
lFont: TsFont;
begin begin
with sWorksheetGrid1 do begin with sWorksheetGrid1 do begin
c := GetWorksheetCol(Col); if Workbook = nil then
r := GetWorksheetRow(Row); exit;
if Worksheet <> nil then begin style := [];
f := Worksheet.GetCell(r, c)^.FontIndex; if AcFontBold.Checked then Include(style, fssBold);
lFont := Workbook.GetFont(f); if AcFontItalic.Checked then Include(style, fssItalic);
style := lFont.Style; if AcFontStrikeout.Checked then Include(style, fssStrikeout);
if TAction(Sender).Checked then if AcFontUnderline.Checked then Include(style, fssUnderline);
Include(style, TsFontStyle(TAction(Sender).Tag)) CellFontStyles[Selection] := style;
else
Exclude(style, TsFontStyle(TAction(Sender).Tag));
Worksheet.WriteFontStyle(r, c, style);
end;
end; end;
end; end;
@ -464,33 +442,20 @@ end;
procedure TForm1.FontComboBoxSelect(Sender: TObject); procedure TForm1.FontComboBoxSelect(Sender: TObject);
var var
c, r: Cardinal; fname: String;
f: Integer;
lFont: TsFont;
h: Integer;
s: String;
begin begin
if sWorksheetGrid1.Workbook = nil then fname := FontCombobox.Items[FontCombobox.ItemIndex];
exit; if fname <> '' then
with sWorksheetGrid1 do CellFontNames[Selection] := fName;
end;
with sWorksheetGrid1 do begin procedure TForm1.FontSizeComboBoxSelect(Sender: TObject);
c := GetWorksheetCol(Col); var
r := GetWorksheetRow(Row); sz: Integer;
f := Worksheet.GetCell(r, c)^.FontIndex; begin
lFont := Workbook.GetFont(f); sz := StrToInt(FontSizeCombobox.Items[FontSizeCombobox.ItemIndex]);
if sz > 0 then
if FontCombobox.ItemIndex = -1 then with sWorksheetGrid1 do CellFontSizes[Selection] := sz;
s := lFont.FontName
else
s := FontCombobox.Items[FontCombobox.ItemIndex];
if FontSizeCombobox.ItemIndex = -1 then
h := round(lFont.Size)
else
h := StrToInt(FontSizeCombobox.Items[FontSizeCombobox.ItemIndex]);
Worksheet.WriteFont(r, c, s, h, lFont.Style, lFont.Color);
end;
end; end;
procedure TForm1.FormActivate(Sender: TObject); procedure TForm1.FormActivate(Sender: TObject);
@ -578,27 +543,18 @@ begin
end; end;
procedure TForm1.sWorksheetGrid1Selection(Sender: TObject; aCol, aRow: Integer); procedure TForm1.sWorksheetGrid1Selection(Sender: TObject; aCol, aRow: Integer);
var
cell: PCell;
c, r: Cardinal;
lFont: TsFont;
begin begin
with sWorksheetGrid1 do begin if sWorksheetGrid1.Workbook = nil then
if Worksheet = nil then exit; exit;
c := GetWorksheetCol(ACol);
r := GetWorksheetRow(ARow);
cell := Worksheet.FindCell(r, c);
end;
UpdateHorAlignmentActions; UpdateHorAlignmentActions;
UpdateVertAlignmentActions; UpdateVertAlignmentActions;
UpdateWordwraps; UpdateWordwraps;
UpdateBackgroundColorIndex; UpdateBackgroundColorIndex;
if cell = nil then // UpdateFontActions;
exit; UpdateFontNameIndex;
lFont := sWorksheetGrid1.Workbook.GetFont(cell^.FontIndex); UpdateFontSizeIndex;
UpdateFontActions(lFont); UpdateFontStyleActions;
end; end;
procedure TForm1.UpdateBackgroundColorIndex; procedure TForm1.UpdateBackgroundColorIndex;
@ -626,14 +582,37 @@ begin
end; end;
end; end;
procedure TForm1.UpdateFontActions(AFont: TsFont); procedure TForm1.UpdateFontNameIndex;
var
fname: String;
begin begin
FontCombobox.ItemIndex := FontCombobox.Items.IndexOf(AFont.FontName); with sWorksheetGrid1 do fname := CellFontNames[Selection];
FontsizeCombobox.ItemIndex := FontSizeCombobox.Items.IndexOf(IntToStr(Round(AFont.Size))); if fname = '' then
AcFontBold.Checked := fssBold in AFont.Style; FontCombobox.ItemIndex := -1
AcFontItalic.Checked := fssItalic in AFont.Style; else
AcFontUnderline.Checked := fssUnderline in AFont.Style; FontCombobox.ItemIndex := FontCombobox.Items.IndexOf(fname);
AcFontStrikeout.Checked := fssStrikeOut in AFont.Style; end;
procedure TForm1.UpdateFontSizeIndex;
var
sz: Single;
begin
with sWorksheetGrid1 do sz := CellFontSizes[Selection];
if sz < 0 then
FontSizeCombobox.ItemIndex := -1
else
FontSizeCombobox.ItemIndex := FontSizeCombobox.Items.IndexOf(IntToStr(Round(sz)));
end;
procedure TForm1.UpdateFontStyleActions;
var
style: TsFontStyles;
begin
with sWorksheetGrid1 do style := CellFontStyles[Selection];
AcFontBold.Checked := fssBold in style;
AcFontItalic.Checked := fssItalic in style;
AcFontUnderline.Checked := fssUnderline in style;
AcFontStrikeout.Checked := fssStrikeOut in style;
end; end;
procedure TForm1.UpdateTextRotationActions; procedure TForm1.UpdateTextRotationActions;

View File

@ -376,7 +376,8 @@ type
AFontSize: Single; AFontStyle: TsFontStyles; AFontColor: TsColor): Integer; overload; AFontSize: Single; AFontStyle: TsFontStyles; AFontColor: TsColor): Integer; overload;
procedure WriteFont(ARow, ACol: Cardinal; AFontIndex: Integer); overload; procedure WriteFont(ARow, ACol: Cardinal; AFontIndex: Integer); overload;
function WriteFontColor(ARow, ACol: Cardinal; AFontColor: TsColor): Integer; function WriteFontColor(ARow, ACol: Cardinal; AFontColor: TsColor): Integer;
function WriteFontSize(ARow, ACol: Cardinal; ASize: Integer): Integer; function WriteFontName(ARow, ACol: Cardinal; AFontName: String): Integer;
function WriteFontSize(ARow, ACol: Cardinal; ASize: Single): Integer;
function WriteFontStyle(ARow, ACol: Cardinal; AStyle: TsFontStyles): Integer; function WriteFontStyle(ARow, ACol: Cardinal; AStyle: TsFontStyles): Integer;
procedure WriteTextRotation(ARow, ACol: Cardinal; ARotation: TsTextRotation); procedure WriteTextRotation(ARow, ACol: Cardinal; ARotation: TsTextRotation);
procedure WriteUsedFormatting(ARow, ACol: Cardinal; AUsedFormatting: TsUsedFormattingFields); procedure WriteUsedFormatting(ARow, ACol: Cardinal; AUsedFormatting: TsUsedFormattingFields);
@ -1506,7 +1507,17 @@ begin
Result := WriteFont(ARow, ACol, fnt.FontName, fnt.Size, fnt.Style, AFontColor); Result := WriteFont(ARow, ACol, fnt.FontName, fnt.Size, fnt.Style, AFontColor);
end; end;
function TsWorksheet.WriteFontSize(ARow, ACol: Cardinal; ASize: Integer): Integer; function TsWorksheet.WriteFontName(ARow, ACol: Cardinal; AFontName: String): Integer;
var
lCell: PCell;
fnt: TsFont;
begin
lCell := GetCell(ARow, ACol);
fnt := Workbook.GetFont(lCell^.FontIndex);
result := WriteFont(ARow, ACol, AFontName, fnt.Size, fnt.Style, fnt.Color);
end;
function TsWorksheet.WriteFontSize(ARow, ACol: Cardinal; ASize: Single): Integer;
var var
lCell: PCell; lCell: PCell;
fnt: TsFont; fnt: TsFont;

View File

@ -37,6 +37,7 @@ type
FOldEditText: String; FOldEditText: String;
FLockCount: Integer; FLockCount: Integer;
FEditing: Boolean; FEditing: Boolean;
FCellFont: TFont;
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;
@ -51,6 +52,16 @@ type
function GetCellBorders(ARect: TGridRect): TsCellBorders; function GetCellBorders(ARect: TGridRect): TsCellBorders;
function GetCellBorderStyle(ACol, ARow: Integer; ABorder: TsCellBorder): TsCellBorderStyle; function GetCellBorderStyle(ACol, ARow: Integer; ABorder: TsCellBorder): TsCellBorderStyle;
function GetCellBorderStyles(ARect: TGridRect; ABorder: TsCellBorder): TsCellBorderStyle; function GetCellBorderStyles(ARect: TGridRect; ABorder: TsCellBorder): TsCellBorderStyle;
function GetCellFont(ACol, ARow: Integer): TFont;
function GetCellFonts(ARect: TGridRect): TFont;
function GetCellFontColor(ACol, ARow: Integer): TsColor;
function GetCellFontColors(ARect: TGridRect): TsColor;
function GetCellFontName(ACol, ARow: Integer): String;
function GetCellFontNames(ARect: TGridRect): String;
function GetCellFontSize(ACol, ARow: Integer): Single;
function GetCellFontSizes(ARect: TGridRect): Single;
function GetCellFontStyle(ACol, ARow: Integer): TsFontStyles;
function GetCellFontStyles(ARect: TGridRect): TsFontStyles;
function GetHorAlignment(ACol, ARow: Integer): TsHorAlignment; function GetHorAlignment(ACol, ARow: Integer): TsHorAlignment;
function GetHorAlignments(ARect: TGridRect): TsHorAlignment; function GetHorAlignments(ARect: TGridRect): TsHorAlignment;
function GetShowGridLines: Boolean; function GetShowGridLines: Boolean;
@ -67,6 +78,16 @@ type
procedure SetCellBorders(ARect: TGridRect; AValue: TsCellBorders); procedure SetCellBorders(ARect: TGridRect; AValue: TsCellBorders);
procedure SetCellBorderStyle(ACol, ARow: Integer; ABorder: TsCellBorder; AValue: TsCellBorderStyle); procedure SetCellBorderStyle(ACol, ARow: Integer; ABorder: TsCellBorder; AValue: TsCellBorderStyle);
procedure SetCellBorderStyles(ARect: TGridRect; ABorder: TsCellBorder; AValue: TsCellBorderStyle); procedure SetCellBorderStyles(ARect: TGridRect; ABorder: TsCellBorder; AValue: TsCellBorderStyle);
procedure SetCellFont(ACol, ARow: Integer; AValue: TFont);
procedure SetCellFonts(ARect: TGridRect; AValue: TFont);
procedure SetCellFontColor(ACol, ARow: Integer; AValue: TsColor);
procedure SetCellFontColors(ARect: TGridRect; AValue: TsColor);
procedure SetCellFontName(ACol, ARow: Integer; AValue: String);
procedure SetCellFontNames(ARect: TGridRect; AValue: String);
procedure SetCellFontStyle(ACol, ARow: Integer; AValue: TsFontStyles);
procedure SetCellFontStyles(ARect: TGridRect; AValue: TsFontStyles);
procedure SetCellFontSize(ACol, ARow: Integer; AValue: Single);
procedure SetCellFontSizes(ARect: TGridRect; AValue: Single);
procedure SetFrozenCols(AValue: Integer); procedure SetFrozenCols(AValue: Integer);
procedure SetFrozenRows(AValue: Integer); procedure SetFrozenRows(AValue: Integer);
procedure SetHorAlignment(ACol, ARow: Integer; AValue: TsHorAlignment); procedure SetHorAlignment(ACol, ARow: Integer; AValue: TsHorAlignment);
@ -153,6 +174,22 @@ type
read GetCellBorderStyle write SetCellBorderStyle; read GetCellBorderStyle write SetCellBorderStyle;
property CellBorderStyles[ARect: TGridRect; ABorder: TsCellBorder]: TsCellBorderStyle property CellBorderStyles[ARect: TGridRect; ABorder: TsCellBorder]: TsCellBorderStyle
read GetCellBorderStyles write SetCellBorderStyles; read GetCellBorderStyles write SetCellBorderStyles;
property CellFont[ACol, ARow: Integer]: TFont
read GetCellFont write SetCellFont;
property CellFonts[ARect: TGridRect]: TFont
read GetCellFonts write SetCellFonts;
property CellFontName[ACol, ARow: Integer]: String
read GetCellFontName write SetCellFontName;
property CellFontNames[ARect: TGridRect]: String
read GetCellFontNames write SetCellFontNames;
property CellFontStyle[ACol, ARow: Integer]: TsFontStyles
read GetCellFontStyle write SetCellFontStyle;
property CellFontStyles[ARect: TGridRect]: TsFontStyles
read GetCellFontStyles write SetCellFontStyles;
property CellFontSize[ACol, ARow: Integer]: Single
read GetCellFontSize write SetCellFontSize;
property CellFontSizes[ARect: TGridRect]: Single
read GetCellFontSizes write SetCellFontSizes;
property HorAlignment[ACol, ARow: Integer]: TsHorAlignment property HorAlignment[ACol, ARow: Integer]: TsHorAlignment
read GetHorAlignment write SetHorAlignment; read GetHorAlignment write SetHorAlignment;
property HorAlignments[ARect: TGridRect]: TsHorAlignment property HorAlignments[ARect: TGridRect]: TsHorAlignment
@ -423,11 +460,13 @@ constructor TsCustomWorksheetGrid.Create(AOwner: TComponent);
begin begin
inherited Create(AOwner); inherited Create(AOwner);
FHeaderCount := 1; FHeaderCount := 1;
FCellFont := TFont.Create;
end; end;
destructor TsCustomWorksheetGrid.Destroy; destructor TsCustomWorksheetGrid.Destroy;
begin begin
FreeAndNil(FWorkbook); FreeAndNil(FWorkbook);
FreeAndNil(FCellFont);
inherited Destroy; inherited Destroy;
end; end;
@ -1243,6 +1282,178 @@ begin
end; end;
end; end;
function TsCustomWorksheetGrid.GetCellFont(ACol, ARow: Integer): TFont;
var
cell: PCell;
fnt: TsFont;
begin
Result := nil;
if (FWorkbook <> nil) and (FWorksheet <> nil) then begin
cell := FWorksheet.FindCell(GetWorksheetRow(ARow), GetWorksheetCol(ACol));
if (cell <> nil) then begin
fnt := FWorkbook.GetFont(cell^.FontIndex);
Convert_sFont_to_Font(fnt, FCellFont);
Result := FCellFont;
end;
end;
end;
function TsCustomWorksheetGrid.GetCellFonts(ARect: TGridRect): TFont;
var
c, r: Integer;
sFont, sDefFont: TsFont;
cell: PCell;
begin
Result := GetCellFont(ARect.Left, ARect.Top);
sDefFont := FWorkbook.GetFont(0); // Default font
for c := ARect.Left to ARect.Right do
for r := ARect.Top to ARect.Bottom do begin
cell := FWorksheet.FindCell(GetWorksheetRow(r), GetWorksheetCol(c));
if cell <> nil then begin
sFont := FWorkbook.GetFont(cell^.FontIndex);
if (sFont.FontName <> sDefFont.FontName) and (sFont.Size <> sDefFont.Size)
and (sFont.Style <> sDefFont.Style) and (sFont.Color <> sDefFont.Color)
then begin
Convert_sFont_to_Font(sDefFont, FCellFont);
Result := FCellFont;
exit;
end;
end;
end;
end;
function TsCustomWorksheetGrid.GetCellFontColor(ACol, ARow: Integer): TsColor;
var
cell: PCell;
fnt: TsFont;
begin
Result := scNotDefined;
if (FWorkbook <> nil) and (FWorksheet <> nil) then begin
cell := FWorksheet.FindCell(GetWorksheetRow(ARow), GetWorksheetCol(ACol));
if (cell <> nil) then begin
fnt := FWorkbook.GetFont(cell^.FontIndex);
if fnt <> nil then
Result := fnt.Color;
end;
end;
end;
function TsCustomWorksheetGrid.GetCellFontColors(ARect: TGridRect): TsColor;
var
c, r: Integer;
clr: TsColor;
begin
Result := GetCellFontColor(ARect.Left, ARect.Top);
clr := Result;
for c := ARect.Left to ARect.Right do
for r := ARect.Top to ARect.Bottom do begin
Result := GetCellFontColor(c, r);
if (Result <> clr) then begin
Result := scNotDefined;
exit;
end;
end;
end;
function TsCustomWorksheetGrid.GetCellFontName(ACol, ARow: Integer): String;
var
cell: PCell;
fnt: TsFont;
begin
Result := '';
if (FWorkbook <> nil) and (FWorksheet <> nil) then begin
cell := FWorksheet.FindCell(GetWorksheetRow(ARow), GetWorksheetCol(ACol));
if (cell <> nil) then begin
fnt := FWorkbook.GetFont(cell^.FontIndex);
if fnt <> nil then
Result := fnt.FontName;
end;
end;
end;
function TsCustomWorksheetGrid.GetCellFontNames(ARect: TGridRect): String;
var
c, r: Integer;
s: String;
begin
Result := GetCellFontName(ARect.Left, ARect.Top);
s := Result;
for c := ARect.Left to ARect.Right do
for r := ARect.Top to ARect.Bottom do begin
Result := GetCellFontName(c, r);
if (Result <> '') and (Result <> s) then begin
Result := '';
exit;
end;
end;
end;
function TsCustomWorksheetGrid.GetCellFontSize(ACol, ARow: Integer): Single;
var
cell: PCell;
fnt: TsFont;
begin
Result := -1.0;
if (FWorkbook <> nil) and (FWorksheet <> nil) then begin
cell := FWorksheet.FindCell(GetWorksheetRow(ARow), GetWorksheetCol(ACol));
if (cell <> nil) then begin
fnt := FWorkbook.GetFont(cell^.FontIndex);
if fnt <> nil then
Result := fnt.Size;
end;
end;
end;
function TsCustomWorksheetGrid.GetCellFontSizes(ARect: TGridRect): Single;
var
c, r: Integer;
sz: Single;
begin
Result := GetCellFontSize(ARect.Left, ARect.Top);
sz := Result;
for c := ARect.Left to ARect.Right do
for r := ARect.Top to ARect.Bottom do begin
Result := GetCellFontSize(c, r);
if (Result <> -1) and not SameValue(Result, sz, 1E-3) then begin
Result := -1.0;
exit;
end;
end;
end;
function TsCustomWorksheetGrid.GetCellFontStyle(ACol, ARow: Integer): TsFontStyles;
var
cell: PCell;
fnt: TsFont;
begin
Result := [];
if (FWorkbook <> nil) and (FWorksheet <> nil) then begin
cell := FWorksheet.FindCell(GetWorksheetRow(ARow), GetWorksheetCol(ACol));
if (cell <> nil) then begin
fnt := FWorkbook.GetFont(cell^.FontIndex);
if fnt <> nil then
Result := fnt.Style;
end;
end;
end;
function TsCustomWorksheetGrid.GetCellFontStyles(ARect: TGridRect): TsFontStyles;
var
c, r: Integer;
style: TsFontStyles;
begin
Result := GetCellFontStyle(ARect.Left, ARect.Top);
style := Result;
for c := ARect.Left to ARect.Right do
for r := ARect.Top to ARect.Bottom do begin
Result := GetCellFontStyle(c, r);
if Result <> style then begin
Result := [];
exit;
end;
end;
end;
{ Returns the height (in pixels) of the cell at ACol/ARow (of the grid). } { Returns the height (in pixels) of the cell at ACol/ARow (of the grid). }
function TsCustomWorksheetGrid.GetCellHeight(ACol, ARow: Integer): Integer; function TsCustomWorksheetGrid.GetCellHeight(ACol, ARow: Integer): Integer;
var var
@ -1627,7 +1838,7 @@ procedure TsCustomWorksheetGrid.SetBackgroundColor(ACol, ARow: Integer;
var var
c, r: Cardinal; c, r: Cardinal;
begin begin
if Assigned(FWorkbook) then begin if Assigned(FWorksheet) then begin
BeginUpdate; BeginUpdate;
try try
c := GetWorksheetCol(ACol); c := GetWorksheetCol(ACol);
@ -1659,7 +1870,7 @@ procedure TsCustomWorksheetGrid.SetCellBorder(ACol, ARow: Integer;
var var
c, r: Cardinal; c, r: Cardinal;
begin begin
if Assigned(FWorkbook) then begin if Assigned(FWorksheet) then begin
BeginUpdate; BeginUpdate;
try try
c := GetWorksheetCol(ACol); c := GetWorksheetCol(ACol);
@ -1690,7 +1901,7 @@ end;
procedure TsCustomWorksheetGrid.SetCellBorderStyle(ACol, ARow: Integer; procedure TsCustomWorksheetGrid.SetCellBorderStyle(ACol, ARow: Integer;
ABorder: TsCellBorder; AValue: TsCellBorderStyle); ABorder: TsCellBorder; AValue: TsCellBorderStyle);
begin begin
if Assigned(FWorkbook) then begin if Assigned(FWorksheet) then begin
BeginUpdate; BeginUpdate;
try try
FWorksheet.WriteBorderStyle(GetWorksheetRow(ARow), GetWorksheetCol(ACol), ABorder, AValue); FWorksheet.WriteBorderStyle(GetWorksheetRow(ARow), GetWorksheetCol(ACol), ABorder, AValue);
@ -1716,6 +1927,122 @@ begin
end; end;
end; end;
procedure TsCustomWorksheetGrid.SetCellFont(ACol, ARow: Integer; AValue: TFont);
var
fnt: TsFont;
begin
FCellFont.Assign(AValue);
if Assigned(FWorksheet) then begin
fnt := TsFont.Create;
try
Convert_Font_To_sFont(FCellFont, fnt);
FWorksheet.WriteFont(GetWorksheetRow(ARow), GetWorksheetCol(ACol),
fnt.FontName, fnt.Size, fnt.Style, fnt.Color);
finally
fnt.Free;
end;
end;
end;
procedure TsCustomWorksheetGrid.SetCellFonts(ARect: TGridRect;
AValue: TFont);
var
c,r: Integer;
begin
BeginUpdate;
try
for c := ARect.Left to ARect.Right do
for r := ARect.Top to ARect.Bottom do
SetCellFont(c, r, AValue);
finally
EndUpdate;
end;
end;
procedure TsCustomWorksheetGrid.SetCellFontColor(ACol, ARow: Integer; AValue: TsColor);
begin
if Assigned(FWorksheet) then
FWorksheet.WriteFontColor(GetWorksheetRow(ARow), GetWorksheetCol(ACol), AValue);
end;
procedure TsCustomWorksheetGrid.SetCellFontColors(ARect: TGridRect; AValue: TsColor);
var
c,r: Integer;
begin
BeginUpdate;
try
for c := ARect.Left to ARect.Right do
for r := ARect.Top to ARect.Bottom do
SetCellFontColor(c, r, AValue);
finally
EndUpdate;
end;
end;
procedure TsCustomWorksheetGrid.SetCellFontName(ACol, ARow: Integer; AValue: String);
begin
if Assigned(FWorksheet) then
FWorksheet.WriteFontName(GetWorksheetRow(ARow), GetWorksheetCol(ACol), AValue);
end;
procedure TsCustomWorksheetGrid.SetCellFontNames(ARect: TGridRect; AValue: String);
var
c,r: Integer;
begin
BeginUpdate;
try
for c := ARect.Left to ARect.Right do
for r := ARect.Top to ARect.Bottom do
SetCellFontName(c, r, AValue);
finally
EndUpdate;
end;
end;
procedure TsCustomWorksheetGrid.SetCellFontSize(ACol, ARow: Integer;
AValue: Single);
begin
if Assigned(FWorksheet) then
FWorksheet.WriteFontSize(GetWorksheetRow(ARow), GetWorksheetCol(ACol), AValue);
end;
procedure TsCustomWorksheetGrid.SetCellFontSizes(ARect: TGridRect;
AValue: Single);
var
c,r: Integer;
begin
BeginUpdate;
try
for c := ARect.Left to ARect.Right do
for r := ARect.Top to ARect.Bottom do
SetCellFontSize(c, r, AValue);
finally
EndUpdate;
end;
end;
procedure TsCustomWorksheetGrid.SetCellFontStyle(ACol, ARow: Integer;
AValue: TsFontStyles);
begin
if Assigned(FWorksheet) then
FWorksheet.WriteFontStyle(GetWorksheetRow(ARow), GetWorksheetCol(ACol), AValue);
end;
procedure TsCustomWorksheetGrid.SetCellFontStyles(ARect: TGridRect;
AValue: TsFontStyles);
var
c,r: Integer;
begin
BeginUpdate;
try
for c := ARect.Left to ARect.Right do
for r := ARect.Top to ARect.Bottom do
SetCellFontStyle(c, r, AValue);
finally
EndUpdate;
end;
end;
{ Fetches the text that is currently in the editor. It is not yet transferred { Fetches the text that is currently in the editor. It is not yet transferred
to the Worksheet because input is checked only at the end of editing. } to the Worksheet because input is checked only at the end of editing. }
procedure TsCustomWorksheetGrid.SetEditText(ACol, ARow: Longint; const AValue: string); procedure TsCustomWorksheetGrid.SetEditText(ACol, ARow: Longint; const AValue: string);
@ -1740,7 +2067,7 @@ end;
procedure TsCustomWorksheetGrid.SetHorAlignment(ACol, ARow: Integer; procedure TsCustomWorksheetGrid.SetHorAlignment(ACol, ARow: Integer;
AValue: TsHorAlignment); AValue: TsHorAlignment);
begin begin
if Assigned(FWorkbook) then if Assigned(FWorksheet) then
FWorksheet.WriteHorAlignment(GetWorksheetRow(ARow), GetWorksheetCol(ACol), AValue); FWorksheet.WriteHorAlignment(GetWorksheetRow(ARow), GetWorksheetCol(ACol), AValue);
end; end;
@ -1782,7 +2109,7 @@ end;
procedure TsCustomWorksheetGrid.SetTextRotation(ACol, ARow: Integer; procedure TsCustomWorksheetGrid.SetTextRotation(ACol, ARow: Integer;
AValue: TsTextRotation); AValue: TsTextRotation);
begin begin
if Assigned(FWorkbook) then if Assigned(FWorksheet) then
FWorksheet.WriteTextRotation(GetWorksheetRow(ARow), GetWorksheetCol(ACol), AValue); FWorksheet.WriteTextRotation(GetWorksheetRow(ARow), GetWorksheetCol(ACol), AValue);
end; end;
@ -1852,7 +2179,7 @@ end;
procedure TsCustomWorksheetGrid.SetVertAlignment(ACol, ARow: Integer; procedure TsCustomWorksheetGrid.SetVertAlignment(ACol, ARow: Integer;
AValue: TsVertAlignment); AValue: TsVertAlignment);
begin begin
if Assigned(FWorkbook) then if Assigned(FWorksheet) then
FWorksheet.WriteVertAlignment(GetWorksheetRow(ARow), GetWorksheetCol(ACol), AValue); FWorksheet.WriteVertAlignment(GetWorksheetRow(ARow), GetWorksheetCol(ACol), AValue);
end; end;
@ -1874,7 +2201,7 @@ end;
procedure TsCustomWorksheetGrid.SetWordwrap(ACol, ARow: Integer; procedure TsCustomWorksheetGrid.SetWordwrap(ACol, ARow: Integer;
AValue: Boolean); AValue: Boolean);
begin begin
if Assigned(FWorkbook) then if Assigned(FWorksheet) then
FWorksheet.WriteWordwrap(GetWorksheetRow(ARow), GetWorksheetCol(ACol), AValue); FWorksheet.WriteWordwrap(GetWorksheetRow(ARow), GetWorksheetCol(ACol), AValue);
end; end;
@ -1946,20 +2273,21 @@ end;
procedure TsCustomWorksheetGrid.SaveToSpreadsheetFile(AFileName: String; procedure TsCustomWorksheetGrid.SaveToSpreadsheetFile(AFileName: String;
AFormat: TsSpreadsheetFormat; AOverwriteExisting: Boolean = true); AFormat: TsSpreadsheetFormat; AOverwriteExisting: Boolean = true);
begin begin
if FWorksheet <> nil then if FWorkbook <> nil then
FWorkbook.WriteToFile(AFileName, AFormat, AOverwriteExisting); FWorkbook.WriteToFile(AFileName, AFormat, AOverwriteExisting);
end; end;
procedure TsCustomWorksheetGrid.SaveToSpreadsheetFile(AFileName: String; procedure TsCustomWorksheetGrid.SaveToSpreadsheetFile(AFileName: String;
AOverwriteExisting: Boolean = true); AOverwriteExisting: Boolean = true);
begin begin
if FWorksheet <> nil then if FWorkbook <> nil then
FWorkbook.WriteToFile(AFileName, AOverwriteExisting); FWorkbook.WriteToFile(AFileName, AOverwriteExisting);
end; end;
procedure TsCustomWorksheetGrid.SelectSheetByIndex(AIndex: Integer); procedure TsCustomWorksheetGrid.SelectSheetByIndex(AIndex: Integer);
begin begin
LoadFromWorksheet(FWorkbook.GetWorksheetByIndex(AIndex)); if FWorkbook <> nil then
LoadFromWorksheet(FWorkbook.GetWorksheetByIndex(AIndex));
end; end;