mORMot and Open Source friends
Check-in [8f12708347]
Not logged in

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:{460} let TSQLTable.GetODSDocument method compute valid .ods field when validated by https://odf-validator.rhcloud.com/ - thanks esmondb for the patch!
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 8f127083479b40b5e029f60306e17a248deb885a
User & Date: ab 2014-11-03 07:51:35
Context
2014-11-03
09:01
{461} now VarRecToUTF8() and foremost FormatUTF8() will handle vtInterface kind of parameter, and display the name of the class implementing the interface check-in: 453bebea3e user: ab tags: trunk
07:51
{460} let TSQLTable.GetODSDocument method compute valid .ods field when validated by https://odf-validator.rhcloud.com/ - thanks esmondb for the patch! check-in: 8f12708347 user: ab tags: trunk
07:45
{459} fixed issue: SynGdiPlus.TJpegImage compiled with a 64-bit exe, the CompressionQuality setting is ignored check-in: 467fc3959e user: ab tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to SQLite3/mORMot.pas.

17654
17655
17656
17657
17658
17659
17660
17661
17662
17663
17664
17665
17666
17667
17668
17669
17670
17671
17672
17673
17674
17675
.....
17686
17687
17688
17689
17690
17691
17692
17693
17694
17695
17696
17697
17698
17699
17700
    MS.Free;
  end;
end;

function TSQLTable.GetODSDocument: RawByteString;
const
  ODSmimetype: RawUTF8 = 'application/vnd.oasis.opendocument.spreadsheet';
  ODSContentHeader: RawUTF8 = '<office:document-content xmlns:office="urn:oasis:names:tc:opendocument:xmlns:office:1.0"'+
  ' xmlns:text="urn:oasis:names:tc:opendocument:xmlns:text:1.0" xmlns:table="urn:oasis:names:tc:opendocument:xmlns:table:1.0"'+
  ' xmlns:meta="urn:oasis:names:tc:opendocument:xmlns:meta:1.0" ><office:body><office:spreadsheet><table:table table:name="Sheet1" >'+
  '<table:table-column table:number-columns-repeated="';
  ODSContentFooter = '</table:table><table:named-expressions/></office:spreadsheet></office:body></office:document-content>';
  ODSstyles: RawUTF8 = XMLUTF8_HEADER+'<office:document-styles xmlns:office="urn:oasis:names:tc:opendocument:xmlns:office:1.0" office:version="1.2"></office:document-styles>';
  ODSmeta: RawUTF8 = XMLUTF8_HEADER+'<office:document-meta xmlns:office="urn:oasis:names:tc:opendocument:xmlns:office:1.0" office:version="1.2"></office:document-meta>';
  ODSsettings: RawUTF8 = XMLUTF8_HEADER+'<office:document-settings xmlns:office="urn:oasis:names:tc:opendocument:xmlns:office:1.0" office:version="1.2"><office:settings>';
  ODSmanifest: RawUTF8 = XMLUTF8_HEADER+'<manifest:manifest xmlns:manifest="urn:oasis:names:tc:opendocument:xmlns:manifest:1.0"'+
  ' manifest:version="1.2"><manifest:file-entry manifest:full-path="/" manifest:version="1.2" manifest:media-type="application/vnd.oasis.opendocument.spreadsheet"/>'+
  '<manifest:file-entry manifest:full-path="meta.xml" manifest:media-type="text/xml"/><manifest:file-entry manifest:full-path="settings.xml" manifest:media-type="text/xml"/>'+
  '<manifest:file-entry manifest:full-path="content.xml" manifest:media-type="text/xml"/><manifest:file-entry manifest:full-path="styles.xml" manifest:media-type="text/xml"/></manifest:manifest>';
var Zip: TZipWriteToStream;
    Dest: TRawByteStringStream;
    content: RawUTF8;
................................................................................
      Zip.AddDeflated('meta.xml',pointer(ODSmeta),length(ODSmeta));
      Zip.AddDeflated('settings.xml',pointer(ODSsettings),length(ODSsettings));
      Zip.AddDeflated('META-INF/manifest.xml',pointer(ODSmanifest),length(ODSmanifest));
      W := TTextWriter.CreateOwnedStream(65536);
      try
        W.AddShort(XMLUTF8_HEADER);
        W.AddString(ODSContentHeader);
        W.Add(RowCount);
        W.AddShort('" />');
        U := pointer(fResults);
        for R := 0 to RowCount do begin
          W.AddShort('<table:table-row>');
          for F := 1 to FieldCount do begin
            W.AddShort('<table:table-cell office:value-type="string"><text:p>');
            W.AddXmlEscape(U^);






|






|







 







|







17654
17655
17656
17657
17658
17659
17660
17661
17662
17663
17664
17665
17666
17667
17668
17669
17670
17671
17672
17673
17674
17675
.....
17686
17687
17688
17689
17690
17691
17692
17693
17694
17695
17696
17697
17698
17699
17700
    MS.Free;
  end;
end;

function TSQLTable.GetODSDocument: RawByteString;
const
  ODSmimetype: RawUTF8 = 'application/vnd.oasis.opendocument.spreadsheet';
  ODSContentHeader: RawUTF8 = '<office:document-content office:version="1.2" xmlns:office="urn:oasis:names:tc:opendocument:xmlns:office:1.0"'+
  ' xmlns:text="urn:oasis:names:tc:opendocument:xmlns:text:1.0" xmlns:table="urn:oasis:names:tc:opendocument:xmlns:table:1.0"'+
  ' xmlns:meta="urn:oasis:names:tc:opendocument:xmlns:meta:1.0" ><office:body><office:spreadsheet><table:table table:name="Sheet1" >'+
  '<table:table-column table:number-columns-repeated="';
  ODSContentFooter = '</table:table><table:named-expressions/></office:spreadsheet></office:body></office:document-content>';
  ODSstyles: RawUTF8 = XMLUTF8_HEADER+'<office:document-styles xmlns:office="urn:oasis:names:tc:opendocument:xmlns:office:1.0" office:version="1.2"></office:document-styles>';
  ODSmeta: RawUTF8 = XMLUTF8_HEADER+'<office:document-meta xmlns:office="urn:oasis:names:tc:opendocument:xmlns:office:1.0" office:version="1.2"></office:document-meta>';
  ODSsettings: RawUTF8 = XMLUTF8_HEADER+'<office:document-settings xmlns:office="urn:oasis:names:tc:opendocument:xmlns:office:1.0" office:version="1.2"></office:document-settings>';
  ODSmanifest: RawUTF8 = XMLUTF8_HEADER+'<manifest:manifest xmlns:manifest="urn:oasis:names:tc:opendocument:xmlns:manifest:1.0"'+
  ' manifest:version="1.2"><manifest:file-entry manifest:full-path="/" manifest:version="1.2" manifest:media-type="application/vnd.oasis.opendocument.spreadsheet"/>'+
  '<manifest:file-entry manifest:full-path="meta.xml" manifest:media-type="text/xml"/><manifest:file-entry manifest:full-path="settings.xml" manifest:media-type="text/xml"/>'+
  '<manifest:file-entry manifest:full-path="content.xml" manifest:media-type="text/xml"/><manifest:file-entry manifest:full-path="styles.xml" manifest:media-type="text/xml"/></manifest:manifest>';
var Zip: TZipWriteToStream;
    Dest: TRawByteStringStream;
    content: RawUTF8;
................................................................................
      Zip.AddDeflated('meta.xml',pointer(ODSmeta),length(ODSmeta));
      Zip.AddDeflated('settings.xml',pointer(ODSsettings),length(ODSsettings));
      Zip.AddDeflated('META-INF/manifest.xml',pointer(ODSmanifest),length(ODSmanifest));
      W := TTextWriter.CreateOwnedStream(65536);
      try
        W.AddShort(XMLUTF8_HEADER);
        W.AddString(ODSContentHeader);
        W.Add(FieldCount);
        W.AddShort('" />');
        U := pointer(fResults);
        for R := 0 to RowCount do begin
          W.AddShort('<table:table-row>');
          for F := 1 to FieldCount do begin
            W.AddShort('<table:table-cell office:value-type="string"><text:p>');
            W.AddXmlEscape(U^);

Changes to SynopseCommit.inc.

1
'1.18.459'
|
1
'1.18.460'