lazspreadsheet: Improves debug tool

git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@2605 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
sekelsenmat 2012-12-27 15:33:51 +00:00
parent d5f6b62914
commit eb0708fe6a
2 changed files with 15 additions and 12 deletions

View File

@ -1,7 +1,7 @@
object lazfpsmainform: Tlazfpsmainform
Left = 234
Height = 401
Top = 170
Top = 195
Width = 700
Caption = 'LazSpreadsheet'
ClientHeight = 401
@ -11,19 +11,19 @@ object lazfpsmainform: Tlazfpsmainform
LCLVersion = '1.1'
object pagesSheets: TPageControl
Left = 0
Height = 321
Top = 80
Height = 289
Top = 112
Width = 700
Align = alClient
TabOrder = 0
end
object Panel1: TPanel
Left = 0
Height = 80
Height = 112
Top = 0
Width = 700
Align = alTop
ClientHeight = 80
ClientHeight = 112
ClientWidth = 700
TabOrder = 1
object btnLoadSpreadsheet: TButton
@ -57,22 +57,23 @@ object lazfpsmainform: Tlazfpsmainform
ParentColor = False
end
object buttonReadCellInfo: TButton
Left = 384
Left = 296
Height = 25
Top = 8
Top = 72
Width = 120
Caption = 'Read Cell Info'
OnClick = buttonReadCellInfoClick
TabOrder = 2
end
object memoCellData: TMemo
Left = 512
Height = 64
Left = 424
Height = 96
Top = 8
Width = 182
Width = 230
Lines.Strings = (
'memoCellData'
)
ScrollBars = ssVertical
TabOrder = 3
end
end

View File

@ -86,9 +86,9 @@ begin
lX := Worksheets[lCurTab].Selection.Left;
lY := Worksheets[lCurTab].Selection.Top;
lCurWorksheet := Workbook.GetWorksheetByIndex(lCurTab);
lCurCell := lCurWorksheet.GetCell(lX, lY);
lCurCell := lCurWorksheet.GetCell(lY, lX);
memoCellData.Lines.Text := '';
memoCellData.Lines.Add(Format('Col: %d Row: %d (zero-based)', [lX, lY]));
memoCellData.Lines.Add(Format('Row: %d Col: %d (zero-based)', [lY, lX]));
memoCellData.Lines.Add(Format('ContentType: %s', [GetEnumName(TypeInfo(TCellContentType), integer(lCurCell^.ContentType))]));
memoCellData.Lines.Add(Format('NumberValue: %f', [lCurCell^.NumberValue]));
memoCellData.Lines.Add(Format('UTF8StringValue: %s', [lCurCell^.UTF8StringValue]));
@ -97,6 +97,8 @@ begin
memoCellData.Lines.Add(Format('TextRotation: %s', [GetEnumName(TypeInfo(TsTextRotation), integer(lCurCell^.TextRotation))]));
//memoCellData.Lines.Add(Format('Border: %f', [lCurCell^.NumberValue]));
memoCellData.Lines.Add(Format('BackgroundColor: %s', [GetEnumName(TypeInfo(TsColor), integer(lCurCell^.BackgroundColor))]));
memoCellData.Lines.Add('');
memoCellData.Lines.Add(Format('ReadAsUTF8Text(): %s', [lCurWorksheet.ReadAsUTF8Text(lY, lX)]));
end;
procedure Tlazfpsmainform.DeleteAllSheets;