diff --git a/components/fpspreadsheet/fpolestorage.pas b/components/fpspreadsheet/fpolestorage.pas index 10084644b..c3544840a 100644 --- a/components/fpspreadsheet/fpolestorage.pas +++ b/components/fpspreadsheet/fpolestorage.pas @@ -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); diff --git a/components/fpspreadsheet/fpsopendocument.pas b/components/fpspreadsheet/fpsopendocument.pas index 67d3a16d4..a7a80e0fc 100755 --- a/components/fpspreadsheet/fpsopendocument.pas +++ b/components/fpspreadsheet/fpsopendocument.pas @@ -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); diff --git a/components/fpspreadsheet/fpspagelayout.pas b/components/fpspreadsheet/fpspagelayout.pas index b07ca375a..7aa398067 100644 --- a/components/fpspreadsheet/fpspagelayout.pas +++ b/components/fpspreadsheet/fpspagelayout.pas @@ -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; diff --git a/components/fpspreadsheet/fpspreadsheet.pas b/components/fpspreadsheet/fpspreadsheet.pas index 1e7407e76..1cc64e59f 100755 --- a/components/fpspreadsheet/fpspreadsheet.pas +++ b/components/fpspreadsheet/fpspreadsheet.pas @@ -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; diff --git a/components/fpspreadsheet/fpspreadsheetgrid.pas b/components/fpspreadsheet/fpspreadsheetgrid.pas index 1a64e732f..24f4d7cd4 100644 --- a/components/fpspreadsheet/fpspreadsheetgrid.pas +++ b/components/fpspreadsheet/fpspreadsheetgrid.pas @@ -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); diff --git a/components/fpspreadsheet/fpstypes.pas b/components/fpspreadsheet/fpstypes.pas index 51db330b7..3be872f39 100644 --- a/components/fpspreadsheet/fpstypes.pas +++ b/components/fpspreadsheet/fpstypes.pas @@ -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; diff --git a/components/fpspreadsheet/uvirtuallayer_ole.pas b/components/fpspreadsheet/uvirtuallayer_ole.pas index b40eb93a0..35693b777 100644 --- a/components/fpspreadsheet/uvirtuallayer_ole.pas +++ b/components/fpspreadsheet/uvirtuallayer_ole.pas @@ -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));