You've already forked lazarus-ccr
fpspreadsheet: Better names for some MetaData properties.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@7578 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
@@ -969,9 +969,9 @@ type
|
||||
TsMetaData = class
|
||||
private
|
||||
FCreatedBy: String;
|
||||
FCreatedAt: TDateTime;
|
||||
FModifiedBy: String;
|
||||
FModifiedAt: TDateTime;
|
||||
FDateCreated: TDateTime;
|
||||
FDateLastModified: TDateTime;
|
||||
FLastModifiedBy: String;
|
||||
FTitle: String;
|
||||
FComments: TStrings;
|
||||
FKeywords: TStrings;
|
||||
@@ -980,9 +980,9 @@ type
|
||||
destructor Destroy;
|
||||
function IsEmpty: Boolean;
|
||||
property CreatedBy: String read FCreatedBy write FCreatedBy;
|
||||
property CreatedAt: TDateTime read FCreatedAt write FCreatedAt;
|
||||
property ModifiedBy: String read FModifiedBy write FModifiedBy;
|
||||
property ModifiedAt: TDatetime read FModifiedAt write FModifiedAt;
|
||||
property LastModifiedBy: String read FLastModifiedBy write FlastModifiedBy;
|
||||
property DateCreated: TDateTime read FDateCreated write FDateCreated;
|
||||
property DateLastModified: TDatetime read FDateLastModified write FDateLastModified;
|
||||
property Title: String read FTitle write FTitle;
|
||||
property Comments: TStrings read FComments write FComments;
|
||||
property Keywords: TStrings read FKeywords write FKeywords;
|
||||
@@ -1208,9 +1208,9 @@ end;
|
||||
|
||||
function TsMetaData.IsEmpty: Boolean;
|
||||
begin
|
||||
Result := (FCreatedBy = '') and (FModifiedBy = '') and (FTitle = '') and
|
||||
Result := (FCreatedBy = '') and (FLastModifiedBy = '') and (FTitle = '') and
|
||||
(FComments.Count = 0) and (FKeywords.Count = 0) and
|
||||
(FCreatedAt = 0) and (FModifiedAt = 0);
|
||||
(FDateCreated = 0) and (FDateLastModified = 0);
|
||||
end;
|
||||
|
||||
|
||||
|
@@ -2666,7 +2666,7 @@ begin
|
||||
'dc:creator':
|
||||
book.MetaData.CreatedBy := s;
|
||||
'cp:lastModifiedBy':
|
||||
book.MetaData.ModifiedBy := s;
|
||||
book.MetaData.LastModifiedBy := s;
|
||||
'dc:description':
|
||||
if s <> '' then
|
||||
begin
|
||||
@@ -2681,10 +2681,10 @@ begin
|
||||
book.MetaData.Keywords.Clear;
|
||||
'dcterms:created':
|
||||
if s <> '' then
|
||||
book.MetaData.CreatedAt := ISO8601StrToDateTime(s);
|
||||
book.MetaData.DateCreated := ISO8601StrToDateTime(s);
|
||||
'dcterms:modified':
|
||||
if s <> '' then
|
||||
book.MetaData.ModifiedAt :=ISO8601StrToDateTime(s);
|
||||
book.MetaData.DateLastModified :=ISO8601StrToDateTime(s);
|
||||
end;
|
||||
ANode := ANode.NextSibling;
|
||||
end;
|
||||
@@ -6143,24 +6143,24 @@ begin
|
||||
'<dc:description>%s</dc:description>', [s]));
|
||||
end;
|
||||
|
||||
if book.MetaData.ModifiedBy = '' then
|
||||
if book.MetaData.LastModifiedBy = '' then
|
||||
s := book.MetaData.CreatedBy
|
||||
else
|
||||
s := book.MetaData.ModifiedBy;
|
||||
s := book.MetaData.LastModifiedBy;
|
||||
AppendToStream(AStream, Format(
|
||||
'<cp:lastModifiedBy>%s</cp:lastModifiedBy>', [s])); // to do: check xml entities
|
||||
|
||||
if book.MetaData.CreatedAt > 0 then
|
||||
if book.MetaData.DateCreated > 0 then
|
||||
begin
|
||||
s := FormatDateTime(ISO8601FormatExtended, book.MetaData.CreatedAt) + 'Z';
|
||||
s := FormatDateTime(ISO8601FormatExtended, book.MetaData.DateCreated) + 'Z';
|
||||
AppendToStream(AStream, Format(
|
||||
'<dcterms:created xsi:type="dcterms:W3CDTF">%s</dcterms:created>', [s]));
|
||||
end;
|
||||
|
||||
if book.MetaData.ModifiedAt = 0 then
|
||||
s := FormatDateTime(ISO8601FormatExtended, book.MetaData.CreatedAt) + 'Z'
|
||||
if book.MetaData.DateLastModified <= 0 then
|
||||
s := FormatDateTime(ISO8601FormatExtended, book.MetaData.DateCreated) + 'Z'
|
||||
else
|
||||
s := FormatDateTime(ISO8601FormatExtended, book.MetaData.ModifiedAt) + 'Z';
|
||||
s := FormatDateTime(ISO8601FormatExtended, book.MetaData.DateLastModified) + 'Z';
|
||||
AppendToStream(AStream, Format(
|
||||
'<dcterms:modified xsi:type="dcterms:W3CDTF">%s</dcterms:modified>', [s]));
|
||||
|
||||
|
Reference in New Issue
Block a user