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

View File

@ -3328,7 +3328,7 @@ var
paramColsRepeated := GetAttrValue(cellNode, 'table:number-columns-repeated');
if paramColsRepeated = '' then paramColsRepeated := '1';
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
// The 2nd condition belongs to a workaround for a bug of LO/OO whichs
// 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.
// React some rows earlier because the added row range is sometimes split
// into two parts.
if row + rowsRepeated < FLimitations.MaxRowCount - 10 then
if row + rowsRepeated < LongInt(FLimitations.MaxRowCount) - 10 then
if not autoRowHeight then
for i:=1 to rowsRepeated do
FWorksheet.WriteRowHeight(row + i - 1, rowHeight, FWorkbook.Units);

View File

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

View File

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

View File

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

View File

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

View File

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