You've already forked lazarus-ccr
lazspreadsheet: Fix for current version of fpspreadsheet
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@5267 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
<?xml version="1.0"?>
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<CONFIG>
|
||||
<ProjectOptions>
|
||||
<Version Value="9"/>
|
||||
@@ -12,9 +12,6 @@
|
||||
<i18n>
|
||||
<EnableI18N LFM="False"/>
|
||||
</i18n>
|
||||
<VersionInfo>
|
||||
<StringTable ProductVersion=""/>
|
||||
</VersionInfo>
|
||||
<BuildModes Count="1">
|
||||
<Item1 Name="Default" Default="True"/>
|
||||
</BuildModes>
|
||||
@@ -41,7 +38,6 @@
|
||||
<Unit0>
|
||||
<Filename Value="lazspreadsheet.lpr"/>
|
||||
<IsPartOfProject Value="True"/>
|
||||
<UnitName Value="lazspreadsheet"/>
|
||||
</Unit0>
|
||||
<Unit1>
|
||||
<Filename Value="about.pas"/>
|
||||
@@ -49,7 +45,6 @@
|
||||
<ComponentName Value="Form1"/>
|
||||
<HasResources Value="True"/>
|
||||
<ResourceBaseClass Value="Form"/>
|
||||
<UnitName Value="about"/>
|
||||
</Unit1>
|
||||
<Unit2>
|
||||
<Filename Value="mainform.pas"/>
|
||||
@@ -57,7 +52,6 @@
|
||||
<ComponentName Value="lazfpsmainform"/>
|
||||
<HasResources Value="True"/>
|
||||
<ResourceBaseClass Value="Form"/>
|
||||
<UnitName Value="mainform"/>
|
||||
</Unit2>
|
||||
</Units>
|
||||
</ProjectOptions>
|
||||
@@ -77,12 +71,6 @@
|
||||
</Win32>
|
||||
</Options>
|
||||
</Linking>
|
||||
<Other>
|
||||
<CompilerMessages>
|
||||
<MsgFileName Value=""/>
|
||||
</CompilerMessages>
|
||||
<CompilerPath Value="$(CompPath)"/>
|
||||
</Other>
|
||||
</CompilerOptions>
|
||||
<Debugging>
|
||||
<Exceptions Count="3">
|
||||
|
Binary file not shown.
@@ -8,7 +8,7 @@ object lazfpsmainform: Tlazfpsmainform
|
||||
ClientWidth = 700
|
||||
OnCreate = FormCreate
|
||||
OnDestroy = FormDestroy
|
||||
LCLVersion = '1.1'
|
||||
LCLVersion = '1.7'
|
||||
object pagesSheets: TPageControl
|
||||
Left = 0
|
||||
Height = 289
|
||||
@@ -37,7 +37,7 @@ object lazfpsmainform: Tlazfpsmainform
|
||||
end
|
||||
object editSourceFile: TFileNameEdit
|
||||
Left = 136
|
||||
Height = 21
|
||||
Height = 23
|
||||
Top = 8
|
||||
Width = 136
|
||||
DialogOptions = []
|
||||
@@ -52,7 +52,7 @@ object lazfpsmainform: Tlazfpsmainform
|
||||
Left = 8
|
||||
Height = 15
|
||||
Top = 14
|
||||
Width = 116
|
||||
Width = 106
|
||||
Caption = 'Source Spreadsheet:'
|
||||
ParentColor = False
|
||||
end
|
||||
@@ -69,7 +69,7 @@ object lazfpsmainform: Tlazfpsmainform
|
||||
Left = 424
|
||||
Height = 96
|
||||
Top = 8
|
||||
Width = 230
|
||||
Width = 264
|
||||
Lines.Strings = (
|
||||
'memoCellData'
|
||||
)
|
||||
@@ -80,7 +80,7 @@ object lazfpsmainform: Tlazfpsmainform
|
||||
Left = 8
|
||||
Height = 15
|
||||
Top = 40
|
||||
Width = 72
|
||||
Width = 66
|
||||
Caption = 'Current Cell:'
|
||||
ParentColor = False
|
||||
end
|
||||
|
@@ -9,7 +9,7 @@ uses
|
||||
StdCtrls, Grids, EditBtn, ExtCtrls, ComCtrls, fpspreadsheetchart,
|
||||
fpspreadsheetgrid, TAGraph, TASeries, TypInfo,
|
||||
// FPSpreadsheet and supported formats
|
||||
fpspreadsheet, fpsallformats
|
||||
fpstypes, fpspreadsheet, fpsallformats
|
||||
;
|
||||
|
||||
type
|
||||
@@ -46,6 +46,10 @@ implementation
|
||||
|
||||
{$R *.lfm}
|
||||
|
||||
uses
|
||||
fpsUtils;
|
||||
|
||||
|
||||
{ Tlazfpsmainform }
|
||||
|
||||
procedure Tlazfpsmainform.btnLoadSpreadsheetClick(Sender: TObject);
|
||||
@@ -73,7 +77,7 @@ begin
|
||||
Worksheets[i].Parent := lCurPage;
|
||||
Worksheets[i].Align := alClient;
|
||||
//Worksheets[i].Options = [goFixedVertLine, goFixedHorzLine, goVertLine, goHorzLine, goRangeSelect, goEditing, goSmoothScroll]
|
||||
Worksheets[i].LoadFromWorksheet(lCurWorksheet);
|
||||
Worksheets[i].LoadFromWorkbook(Workbook, i); //LoadFromWorksheet(lCurWorksheet);
|
||||
Worksheets[i].OnSelection := @HandleSelectionChanged;
|
||||
lCurPage.Caption := lCurWorksheet.Name;
|
||||
end;
|
||||
@@ -84,12 +88,14 @@ var
|
||||
lX, lY, lCurTab: LongInt;
|
||||
lCurWorksheet: TsWorksheet;
|
||||
lCurCell: PCell;
|
||||
fmt: PsCellFormat;
|
||||
begin
|
||||
lCurTab := pagesSheets.TabIndex;
|
||||
lX := Worksheets[lCurTab].Selection.Left;
|
||||
lY := Worksheets[lCurTab].Selection.Top;
|
||||
lX := Worksheets[lCurTab].Selection.Left - 1; // -1 for fixed rows/cols
|
||||
lY := Worksheets[lCurTab].Selection.Top - 1;
|
||||
lCurWorksheet := Workbook.GetWorksheetByIndex(lCurTab);
|
||||
lCurCell := lCurWorksheet.GetCell(lY, lX);
|
||||
fmt := Workbook.GetPointerToCellFormat(lCurCell^.FormatIndex);
|
||||
memoCellData.Lines.Text := '';
|
||||
memoCellData.Lines.Add(Format('Row: %d Col: %d (zero-based)', [lY, lX]));
|
||||
memoCellData.Lines.Add(Format('ContentType: %s', [GetEnumName(TypeInfo(TCellContentType), integer(lCurCell^.ContentType))]));
|
||||
@@ -97,11 +103,11 @@ begin
|
||||
memoCellData.Lines.Add(Format('UTF8StringValue: %s', [lCurCell^.UTF8StringValue]));
|
||||
//memoCellData.Lines.Add(Format('DateTimeValue: %s', [lCurCell^.DateTimeValue]));
|
||||
//memoCellData.Lines.Add(Format('UsedFormattingFields: %f', [lCurCell^.NumberValue]));
|
||||
memoCellData.Lines.Add(Format('TextRotation: %s', [GetEnumName(TypeInfo(TsTextRotation), integer(lCurCell^.TextRotation))]));
|
||||
memoCellData.Lines.Add(Format('TextRotation: %s', [GetEnumName(TypeInfo(TsTextRotation), integer(fmt^.TextRotation))]));
|
||||
//memoCellData.Lines.Add(Format('Border: %f', [lCurCell^.NumberValue]));
|
||||
memoCellData.Lines.Add(Format('BackgroundColor: %s', [GetEnumName(TypeInfo(TsColor), integer(lCurCell^.BackgroundColor))]));
|
||||
memoCellData.Lines.Add(Format('BackgroundColor: %s', [GetColorName(fmt^.Background.BgColor)]));
|
||||
memoCellData.Lines.Add('');
|
||||
memoCellData.Lines.Add(Format('ReadAsUTF8Text(): %s', [lCurWorksheet.ReadAsUTF8Text(lY, lX)]));
|
||||
memoCellData.Lines.Add(Format('ReadAsText(): %s', [lCurWorksheet.ReadAsText(lY, lX)]));
|
||||
end;
|
||||
|
||||
procedure Tlazfpsmainform.DeleteAllSheets;
|
||||
|
Reference in New Issue
Block a user