Winsoft Libre 1.0 Full Source » Developer.Team

Winsoft Libre 1.0 Full Source

Winsoft Libre 1.0 Full Source
Winsoft Libre 1.0 Full Source | 30 Mb


Delphi library for automating LibreOffice.

complete LibreOffice API supported
available for Delphi 7 - 10.1
source code included in full version
distributing library in applications is royalty free

type
  ELibreError = class(SysUtils.Exception)
  end;

  ILibre = interface
    function CreateInstance(const Service: WideString): Variant;
    function OpenDocument(const FileName: WideString; ReadOnly: Boolean = False; Preview: Boolean = False; Hidden: Boolean = False): XComponent;
    function OpenDocumentUrl(const Url: WideString; ReadOnly: Boolean = False; Preview: Boolean = False; Hidden: Boolean = False): XComponent;

    function CreateDrawPagesSupplier: XDrawPagesSupplier;
    function CreateFunction: XFunction;
    function CreatePresentationSupplier: XPresentationSupplier;

    function CreateTextDocument(ReadOnly: Boolean = False; Preview: Boolean = False; Hidden: Boolean = False): XTextDocument;
    function CreateHtmlDocument(ReadOnly: Boolean = False; Preview: Boolean = False; Hidden: Boolean = False): XTextDocument;
    function OpenTextDocument(const FileName: WideString; ReadOnly: Boolean = False; Preview: Boolean = False; Hidden: Boolean = False): XTextDocument; overload;
    function OpenTextDocumentUrl(const Url: WideString; ReadOnly: Boolean = False; Preview: Boolean = False; Hidden: Boolean = False): XTextDocument; overload;

    function CreateSpreadsheetDocument(ReadOnly: Boolean = False; Preview: Boolean = False; Hidden: Boolean = False): XSpreadsheetDocument;
    function OpenSpreadsheetDocument(const FileName: WideString; ReadOnly: Boolean = False; Preview: Boolean = False; Hidden: Boolean = False): XSpreadsheetDocument; overload;
    function OpenSpreadsheetDocumentUrl(const Url: WideString; ReadOnly: Boolean = False; Preview: Boolean = False; Hidden: Boolean = False): XSpreadsheetDocument; overload;

    function CreateChartDocument(ReadOnly: Boolean = False; Preview: Boolean = False; Hidden: Boolean = False): XChartDocument_2;
    function OpenChartDocument(const FileName: WideString; ReadOnly: Boolean = False; Preview: Boolean = False; Hidden: Boolean = False): XChartDocument_2;
    function OpenChartDocumentUrl(const Url: WideString; ReadOnly: Boolean = False; Preview: Boolean = False; Hidden: Boolean = False): XChartDocument_2;

    property ComponentLoader: XComponentLoader read;
    property Desktop: XDesktop2 read;
    property IdlReflection: XIdlReflection read;
    property MultiServiceFactory: XMultiServiceFactory read;
    property Terminate: Boolean read _GetTerminate write;
  end;

  CoLibre = class(TInterfacedObject, ILibre)
  public
    constructor Create(Terminate: Boolean = False);
  end;

procedure Check(Assertion: Boolean; const ErrorMessage: string);
function VarIsValid(const Value: Variant): Boolean;
function ToUrl(const Url: WideString): WideString;
function ToFileUrl(const FileName: WideString): WideString;


[/b]

[b] Only for V.I.P
Warning! You are not allowed to view this text.
SiteLock