Package ag.ion.bion.officelayer.document

Examples of ag.ion.bion.officelayer.document.IDocument


      IDocumentDescriptor documentDescriptor) throws NOAException {
    try {
      PropertyValue[] propertyValues = DocumentDescriptorTransformer
          .documentDescriptor2PropertyValues(documentDescriptor);
      url = URLAdapter.adaptURL(url);
      IDocument document = DocumentLoader.loadDocument(serviceProvider,
          url, propertyValues);
      if (document != null)
        return document;
      else
        throw new NOAException(Messages
View Full Code Here


    }

    if (officeProgressMonitor != null)
      officeProgressMonitor.beginSubTask(Messages
          .getString("DocumentService_monitor_investigating")); //$NON-NLS-1$
    IDocument document = DocumentLoader.getDocument(xComponent,
        serviceProvider, properties);
    if (document != null) {
      if (officeProgressMonitor != null) {
        officeProgressMonitor
            .beginSubTask(Messages
View Full Code Here

    if (url == null)
      throw new DocumentException("The submitted url is not valid."); //$NON-NLS-1$

    try {
      url = URLAdapter.adaptURL(url);
      IDocument document = DocumentLoader
          .loadDocument(
              serviceProvider,
              frame.getXFrame(),
              url,
              FrameSearchFlag.ALL,
View Full Code Here

    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

      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

   
    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));

      /*
       * Now do the work with text content.
View Full Code Here

      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);
     
      ITextDocument textDocument = (ITextDocument)document;
      textDocument.addCloseListener(new SnippetDocumentCloseListener(officeAplication));

    }
View Full Code Here

      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.");
     
      //OK - now we need a search query
View Full Code Here

   
    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));
     
      /*
       * This stuff was already discussed in Snippet2 but now lets begin to
View Full Code Here

      LocalOfficeApplicationConfiguration configuration = new LocalOfficeApplicationConfiguration();
      configuration.setApplicationHomePath("/home/Sebastianr/OpenOffice.org1.1.1");
      localOfficeApplication.setConfiguration(configuration);
      localOfficeApplication.activate();
     
      IDocument document = localOfficeApplication.getDocumentService().loadDocument(new FileInputStream(new File("test/testTexts.sxw")), new DocumentDescriptor());
      if (document != null) {
        System.out.println("Loaded document");
       
        ITextDocument textDocument = (ITextDocument)document;
             
View Full Code Here

TOP

Related Classes of ag.ion.bion.officelayer.document.IDocument

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.