Package ag.ion.bion.officelayer.application

Examples of ag.ion.bion.officelayer.application.IOfficeApplication


  public static void main(String[] args) {
    try {
      HashMap configuration = new HashMap();
      configuration.put(IOfficeApplication.APPLICATION_HOME_KEY, OPEN_OFFICE_ORG_PATH);
      configuration.put(IOfficeApplication.APPLICATION_TYPE_KEY, IOfficeApplication.LOCAL_APPLICATION);
      final IOfficeApplication officeAplication = OfficeApplicationRuntime.getApplication(configuration);
      officeAplication.setConfiguration(configuration);
      officeAplication.activate();
      IDocumentService documentService = officeAplication.getDocumentService();
      ITextDocument textDocument = (ITextDocument)documentService.constructNewDocument(IDocument.WRITER, DocumentDescriptor.DEFAULT);

      //construct table
      int rows = 15;
      int cols = 5;
View Full Code Here


  public static void main(String[] args) {
    try {
      HashMap configuration = new HashMap();
      configuration.put(IOfficeApplication.APPLICATION_HOME_KEY, OPEN_OFFICE_ORG_PATH);
      configuration.put(IOfficeApplication.APPLICATION_TYPE_KEY, IOfficeApplication.LOCAL_APPLICATION);
      IOfficeApplication officeAplication = OfficeApplicationRuntime.getApplication(configuration)
      officeAplication.setConfiguration(configuration);
      officeAplication.activate();
      IDocumentService documentService = officeAplication.getDocumentService();
      IDocument document = documentService.constructNewDocument(IDocument.CALC, DocumentDescriptor.DEFAULT);
      ISpreadsheetDocument spreadsheetDocument = (ISpreadsheetDocument) document;
      XSpreadsheets spreadsheets = spreadsheetDocument.getSpreadsheetDocument().getSheets();
      String sheetName= "Tabelle1";
      Object[][] rows = new Object[][]{
View Full Code Here

      return null;

    OODrawRepresentation ooRepresentation = (OODrawRepresentation) representation;
    IShapeProvider shapeProvider = ooRepresentation.getShapeProvider();

    IOfficeApplication officeApplication = EditorCorePlugin.getDefault()
        .getManagedLocalOfficeApplication();

    IDrawingDocument document;

    try {
      document = (IDrawingDocument) officeApplication
          .getDocumentService().constructNewDocument(IDocument.DRAW,
              DocumentDescriptor.DEFAULT_HIDDEN);
    } catch (NOAException e) {
      return null;
    } catch (OfficeApplicationException e) {
View Full Code Here

    HashMap configuration = new HashMap();
    configuration.put(IOfficeApplication.APPLICATION_HOME_KEY, OPEN_OFFICE_ORG_PATH);
    configuration.put(IOfficeApplication.APPLICATION_TYPE_KEY, IOfficeApplication.LOCAL_APPLICATION);
   
    try {
      IOfficeApplication officeAplication = OfficeApplicationRuntime.getApplication(configuration);
      officeAplication.activate();
      IDocumentService documentService = officeAplication.getDocumentService();
      IDocument document = documentService.constructNewDocument(IDocument.WRITER, DocumentDescriptor.DEFAULT);
      ITextDocument textDocument = (ITextDocument)document;
      textDocument.addCloseListener(new SnippetDocumentCloseListener(officeAplication));

      /*
 
View Full Code Here

    HashMap hashMap = new HashMap(2);
    hashMap.put(IOfficeApplication.APPLICATION_TYPE_KEY, IOfficeApplication.LOCAL_APPLICATION);
    hashMap.put(IOfficeApplication.APPLICATION_HOME_KEY, officeHome);

    try {
      IOfficeApplication application = OfficeApplicationRuntime.getApplication(hashMap);
      application.activate();
      IDocument document = application.getDocumentService().constructNewHiddenDocument(IDocument.BASE);
     
      document.getPersistenceService().store(storePath);
      application.deactivate();
      application.dispose();
    }
    catch(Throwable throwable) {
      throwable.printStackTrace();
    }
  }
View Full Code Here

    configuration.put(IOfficeApplication.APPLICATION_TYPE_KEY, IOfficeApplication.LOCAL_APPLICATION);

    try {
      String datei = "p:/tests/bsp1.doc";
      String dateiNeu = "p:/tests/bsp1NEU.doc";
      IOfficeApplication officeAplication = OfficeApplicationRuntime.getApplication(configuration);
      officeAplication.activate();
      IDocumentService documentService = officeAplication.getDocumentService();
      IDocument document = documentService.loadDocument(datei, DocumentDescriptor.DEFAULT);
      ITextDocument textDocument = (ITextDocument) document;

      ITextService textService = textDocument.getTextService();
      IBookmarkService bookmarkService = textService.getBookmarkService();
      IBookmark bookmark = bookmarkService.getBookmark("Status");
      String name = bookmark.getName();
      bookmark.setText("In Arbeit NEU345");
      textDocument.getTextFieldService().refresh();
      document.getPersistenceService().export(dateiNeu, new MSOffice97Filter());
      textDocument.close();
      document.close();
      officeAplication.dispose();
    }
    catch (Exception exception) {
      exception.printStackTrace();
    }
  }
View Full Code Here

    HashMap configuration = new HashMap();
    configuration.put(IOfficeApplication.APPLICATION_HOME_KEY, OPEN_OFFICE_ORG_PATH);
    configuration.put(IOfficeApplication.APPLICATION_TYPE_KEY, IOfficeApplication.LOCAL_APPLICATION);
   
    try {
      IOfficeApplication officeAplication = OfficeApplicationRuntime.getApplication(configuration);
      officeAplication.activate();
      IDocumentService documentService = officeAplication.getDocumentService();
      IDocument document = documentService.constructNewDocument(IDocument.WRITER, DocumentDescriptor.DEFAULT);
      ITextDocument textDocument = (ITextDocument)document;
      textDocument.addCloseListener(new SnippetDocumentCloseListener(officeAplication));

      /*
 
View Full Code Here

    HashMap configuration = new HashMap();
    configuration.put(IOfficeApplication.APPLICATION_HOME_KEY, OPEN_OFFICE_ORG_PATH);
    configuration.put(IOfficeApplication.APPLICATION_TYPE_KEY, IOfficeApplication.LOCAL_APPLICATION);
   
    try {
      IOfficeApplication officeAplication = OfficeApplicationRuntime.getApplication(configuration);
      officeAplication.activate();
      IDocumentService documentService = officeAplication.getDocumentService();
     
      // we expect a file, beeing placed in the user home directory, otherwise use another url
      String url = System.getProperty("user.home") +System.getProperty("file.separator")+ DOCUMENT_NAME;
      IDocument document = documentService.loadDocument(url);
     
View Full Code Here

  public static void main(String[] args) {
    try {
      HashMap configuration = new HashMap();
      configuration.put(IOfficeApplication.APPLICATION_HOME_KEY, OPEN_OFFICE_ORG_PATH);
      configuration.put(IOfficeApplication.APPLICATION_TYPE_KEY, IOfficeApplication.LOCAL_APPLICATION);
      IOfficeApplication officeAplication = OfficeApplicationRuntime.getApplication(configuration)
      officeAplication.setConfiguration(configuration);
      officeAplication.activate();
      IDocumentService documentService = officeAplication.getDocumentService();
      IDocument document = documentService.constructNewDocument(IDocument.WRITER, DocumentDescriptor.DEFAULT);
      ITextDocument textDocument = (ITextDocument)document;
      //First some text ...
      textDocument.getTextService().getText().setText("This is a text content for a search example with NOA.");
     
View Full Code Here

    HashMap configuration = new HashMap();
    configuration.put(IOfficeApplication.APPLICATION_HOME_KEY, OPEN_OFFICE_ORG_PATH);
    configuration.put(IOfficeApplication.APPLICATION_TYPE_KEY, IOfficeApplication.LOCAL_APPLICATION);
   
    try {
      IOfficeApplication officeAplication = OfficeApplicationRuntime.getApplication(configuration);
      officeAplication.activate();
      IDocumentService documentService = officeAplication.getDocumentService();
      IDocument document = documentService.constructNewDocument(IDocument.WRITER, DocumentDescriptor.DEFAULT);
      ITextDocument textDocument = (ITextDocument)document;
      textDocument.addCloseListener(new SnippetDocumentCloseListener(officeAplication));
     
      /*
 
View Full Code Here

TOP

Related Classes of ag.ion.bion.officelayer.application.IOfficeApplication

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.