You've already forked lazarus-ccr
fpspreadsheet: Implement virtual mode for all biff file formats. Add record limitations with writer-specific max row and col counts: a file is not written to a particular file format if it exceeds the limitations of the file format.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3307 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
@ -23,7 +23,8 @@ type
|
||||
|
||||
TOLEDocument = record
|
||||
// Information about the document
|
||||
Stream: TMemoryStream;
|
||||
Stream: TStream;
|
||||
// Stream: TMemoryStream;
|
||||
end;
|
||||
|
||||
|
||||
@ -57,7 +58,7 @@ var
|
||||
begin
|
||||
VLAbsolutePath:='/'+AStreamName; //Virtual layer always use absolute paths.
|
||||
if not AOverwriteExisting and FileExists(AFileName) then begin
|
||||
Raise EStreamError.Createfmt('File already exists "%s"',[AFileName]);
|
||||
Raise EStreamError.Createfmt('File "%s" already exists.',[AFileName]);
|
||||
end;
|
||||
RealFile:=TFileStream.Create(AFileName,fmCreate);
|
||||
fsOLE:=TVirtualLayer_OLE.Create(RealFile);
|
||||
@ -101,7 +102,7 @@ begin
|
||||
if not Assigned(AOLEDocument.Stream) then begin
|
||||
AOLEDocument.Stream:=TMemoryStream.Create;
|
||||
end else begin
|
||||
AOLEDocument.Stream.Clear;
|
||||
(AOLEDocument.Stream as TMemoryStream).Clear;
|
||||
end;
|
||||
AOLEDocument.Stream.CopyFrom(OLEStream,OLEStream.Size);
|
||||
end;
|
||||
|
Reference in New Issue
Block a user