fpspreadsheet: Less hints and warnings

git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@4615 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
wp_xxyyzz
2016-04-11 09:45:27 +00:00
parent c114664319
commit 8025b4fd9e
7 changed files with 18 additions and 15 deletions

View File

@ -407,7 +407,7 @@ begin
INT_OLE_DIR_ENTRY_TYPE_ROOT_STORAGE, INT_OLE_DIR_COLOR_RED, INT_OLE_DIR_ENTRY_TYPE_ROOT_STORAGE, INT_OLE_DIR_COLOR_RED,
True, $00000003, FContainerSize); True, $00000003, FContainerSize);
WriteDirectoryEntry(AStream, ABookStreamName+#0, WriteDirectoryEntry(AStream, Utf8Decode(ABookStreamName+#0),
INT_OLE_DIR_ENTRY_TYPE_USER_STREAM, INT_OLE_DIR_COLOR_BLACK, INT_OLE_DIR_ENTRY_TYPE_USER_STREAM, INT_OLE_DIR_COLOR_BLACK,
False, 0, FOLEDocument.Stream.Size); False, 0, FOLEDocument.Stream.Size);
@ -425,7 +425,7 @@ begin
INT_OLE_DIR_ENTRY_TYPE_ROOT_STORAGE, INT_OLE_DIR_COLOR_RED, INT_OLE_DIR_ENTRY_TYPE_ROOT_STORAGE, INT_OLE_DIR_COLOR_RED,
True, $FFFFFFFE, 0); True, $FFFFFFFE, 0);
WriteDirectoryEntry(AStream, ABookStreamName+#0, WriteDirectoryEntry(AStream, Utf8Decode(ABookStreamName+#0),
INT_OLE_DIR_ENTRY_TYPE_USER_STREAM, INT_OLE_DIR_COLOR_BLACK, INT_OLE_DIR_ENTRY_TYPE_USER_STREAM, INT_OLE_DIR_COLOR_BLACK,
False, $00000002, FOLEDocument.Stream.Size); False, $00000002, FOLEDocument.Stream.Size);

View File

@ -3328,7 +3328,7 @@ var
paramColsRepeated := GetAttrValue(cellNode, 'table:number-columns-repeated'); paramColsRepeated := GetAttrValue(cellNode, 'table:number-columns-repeated');
if paramColsRepeated = '' then paramColsRepeated := '1'; if paramColsRepeated = '' then paramColsRepeated := '1';
n := StrToInt(paramColsRepeated); n := StrToInt(paramColsRepeated);
if (n > 1) and (col + n < FLimitations.MaxColCount - 10) then if (n > 1) and (col + n < LongInt(FLimitations.MaxColCount) - 10) then
begin begin
// The 2nd condition belongs to a workaround for a bug of LO/OO whichs // The 2nd condition belongs to a workaround for a bug of LO/OO whichs
// extends imported xlsx files with blank cols up to their // extends imported xlsx files with blank cols up to their
@ -3364,7 +3364,7 @@ var
// xlsx files with blank rows up to their specification limit. // xlsx files with blank rows up to their specification limit.
// React some rows earlier because the added row range is sometimes split // React some rows earlier because the added row range is sometimes split
// into two parts. // into two parts.
if row + rowsRepeated < FLimitations.MaxRowCount - 10 then if row + rowsRepeated < LongInt(FLimitations.MaxRowCount) - 10 then
if not autoRowHeight then if not autoRowHeight then
for i:=1 to rowsRepeated do for i:=1 to rowsRepeated do
FWorksheet.WriteRowHeight(row + i - 1, rowHeight, FWorkbook.Units); FWorksheet.WriteRowHeight(row + i - 1, rowHeight, FWorkbook.Units);

View File

@ -710,13 +710,13 @@ begin
begin begin
inc(P); inc(P);
if (P^ = 'L') or (P^ = 'l') then if (P^ = 'L') or (P^ = 'l') then
pL := PtrUInt(P) - PtrUInt(PStart) pL := {%H-}PtrUInt(P) - {%H-}PtrUInt(PStart)
else else
if (P^ = 'C') or (P^ = 'c') then if (P^ = 'C') or (P^ = 'c') then
pC := PtrUInt(P) - PtrUInt(PStart) pC := {%H-}PtrUInt(P) - {%H-}PtrUInt(PStart)
else else
if (P^ = 'R') or (P^ = 'r') then if (P^ = 'R') or (P^ = 'r') then
pR := PtrUInt(P) - PtrUInt(PStart); pR := {%H-}PtrUInt(P) - {%H-}PtrUInt(PStart);
end; end;
inc(P); inc(P);
end; end;

View File

@ -8503,7 +8503,7 @@ var
srcCell, destCell: PCell; srcCell, destCell: PCell;
i: Integer; // counter i: Integer; // counter
ncs, nrs: Integer; // Num cols source, num rows source, ... ncs, nrs: Integer; // Num cols source, num rows source, ...
ncd, nrd: Integer; //ncd, nrd: Integer;
rdest, cdest: Integer; // row and column index at destination rdest, cdest: Integer; // row and column index at destination
nselS, nselD: Integer; // count of selected blocks nselS, nselD: Integer; // count of selected blocks
begin begin
@ -8597,12 +8597,14 @@ begin
// Iterate over all destination blocks // Iterate over all destination blocks
for i := 0 to nselD-1 do for i := 0 to nselD-1 do
begin begin
(*
// size of currently selected block at destination // size of currently selected block at destination
with ActiveWorksheet.GetSelection[i] do with ActiveWorksheet.GetSelection[i] do
begin begin
ncd := Integer(Col2) - Integer(Col1) + 1; ncd := Integer(Col2) - Integer(Col1) + 1;
nrd := Integer(Row2) - Integer(Row1) + 1; nrd := Integer(Row2) - Integer(Row1) + 1;
end; end;
*)
r := ActiveWorksheet.GetSelection[i].Row1; r := ActiveWorksheet.GetSelection[i].Row1;
while r <= longint(ActiveWorksheet.GetSelection[i].Row2) do begin while r <= longint(ActiveWorksheet.GetSelection[i].Row2) do begin
c := ActiveWorksheet.GetSelection[i].Col1; c := ActiveWorksheet.GetSelection[i].Col1;

View File

@ -2325,7 +2325,7 @@ var
R: TRect; R: TRect;
cell: PCell; cell: PCell;
r1,c1,r2,c2: Cardinal; r1,c1,r2,c2: Cardinal;
delta: Integer; //delta: Integer;
savedPenMode: TPenMode; savedPenMode: TPenMode;
begin begin
if Worksheet = nil then if Worksheet = nil then
@ -2344,9 +2344,9 @@ begin
if IsRightToLeft then inc(R.Right) else dec(R.Left); if IsRightToLeft then inc(R.Right) else dec(R.Left);
// Cosmetics at the edges of the grid to avoid spurious rests // Cosmetics at the edges of the grid to avoid spurious rests
{
delta := Max(FSelPen.Width div 2, 0); delta := Max(FSelPen.Width div 2, 0);
{
if Selection.Top > TopRow then if Selection.Top > TopRow then
dec(R.Top, delta) else dec(R.Top, delta) else
inc(R.Top, delta); inc(R.Top, delta);

View File

@ -407,9 +407,9 @@ const
scGray25pct = scSilver deprecated; scGray25pct = scSilver deprecated;
scGray50pct = scGray deprecated; scGray50pct = scGray deprecated;
scGray10pct = $00E6E6E6 deprecated; scGray10pct = $00E6E6E6 deprecated;
scGrey10pct = scGray10pct deprecated; scGrey10pct = scGray10pct{%H-} deprecated;
scGray20pct = $00CCCCCC deprecated; scGray20pct = $00CCCCCC deprecated;
scGrey20pct = scGray20pct deprecated; scGrey20pct = scGray20pct{%H-} deprecated;
scPeriwinkle = $00FF9999 deprecated; scPeriwinkle = $00FF9999 deprecated;
scPlum = $00663399 deprecated; scPlum = $00663399 deprecated;
scIvory = $00CCFFFF deprecated; scIvory = $00CCFFFF deprecated;
@ -430,7 +430,7 @@ const
scLightOrange = $000099FF deprecated; scLightOrange = $000099FF deprecated;
scOrange = $000066FF deprecated; scOrange = $000066FF deprecated;
scBlueGray = $00996666 deprecated; scBlueGray = $00996666 deprecated;
scBlueGrey = scBlueGray deprecated; scBlueGrey = scBlueGray{%H-} deprecated;
scGray40pct = $00969696 deprecated; scGray40pct = $00969696 deprecated;
scDarkTeal = $00663300 deprecated; scDarkTeal = $00663300 deprecated;
scSeaGreen = $00669933 deprecated; scSeaGreen = $00669933 deprecated;

View File

@ -318,7 +318,8 @@ var
SSID: SID; SSID: SID;
function AddNamesWithSID(const AStartSibling: SID): SID; function AddNamesWithSID(const AStartSibling: SID): SID;
var var
Name: WideString; // Name: WideString; // wp: was
Name: String;
VI: TVirtualLayer_Item; VI: TVirtualLayer_Item;
begin begin
Name:=UTF8Encode(wideString(FDirectory[AStartSibling]._ab)); Name:=UTF8Encode(wideString(FDirectory[AStartSibling]._ab));