Package spatschorke.da.ooconnector

Examples of spatschorke.da.ooconnector.OODocument


    return id;
  }

  private String integrateInText(TextInfo textInfo,
      TextPosition position) {
    OODocument ooDocument = (OODocument) position.getTutorialDocument();
    ITextDocument textDocument = (ITextDocument) ooDocument.getDocument();
    ITextRange textRange = position.getTextRange();

    ITextContentService textContentService = textDocument.getTextService().getTextContentService();

    ITextDocumentTextShape textDocumentTextShape = null;
View Full Code Here


  public int undoIntegration(ITutorialDocument tutorialDocument,
      String integrationID, String undoString) {
    if (tutorialDocument == null)
      return 0;

    OODocument ooDocument = (OODocument) tutorialDocument;
    IDocument document = ooDocument.getDocument();

    if (document.getDocumentType().equals(IDocument.WRITER)){
      return undoTextIntegration((ITextDocument) document, integrationID, undoString);
    }
    return 0;
View Full Code Here

  @Test
  public void generateArtefactTest() throws OfficeApplicationException,
      NOAException, ParseException, IOException {
    OOApplication ooApplication = new OOApplication();
    IDocument document = ooApplication.loadDocument("test/sample.odt"); //$NON-NLS-1$
    OODocument ooDocument = new OODocument(document, new EclipseFile(
        "test/sample.odt")); //$NON-NLS-1$

    XMLProvider provider = new XMLProvider(
        "org.some.provider", "some.artefact"); //$NON-NLS-1$//$NON-NLS-2$
    XMLReference reference = new XMLReference(provider);
View Full Code Here

        .loadDocument("test/tagSearchTest.odp"); //$NON-NLS-1$
    testTag(document);
  }

  private void testTag(IDocument document) {
    OODocument ooDocument = new OODocument(document, null);
    List<IArtefactPosition> positions = ConnectorMaster.getInstance()
        .searchArtefactTags(ooDocument);
    String tag = positions.get(0).extractTag();
    Assert.assertEquals(expectedTag, tag);
  }
View Full Code Here

  @Test
  public void testWriter() throws NOAException, OfficeApplicationException {
    ITextDocument document = (ITextDocument) ooApplication
        .constructNewDocument(IDocument.WRITER);

    OODocument ooDocument = new OODocument(document, new EclipseFile(
        "tmp file")); //$NON-NLS-1$

    String tag = "<aTag/>"; //$NON-NLS-1$
    ConnectorMaster.getInstance().insertTagsIntoDocument(tag, ooDocument);
View Full Code Here

  public void testImpress() throws NOAException, OfficeApplicationException,
      PresentationException {
    IPresentationDocument document = (IPresentationDocument) ooApplication
        .constructNewDocument(IDocument.IMPRESS);

    OODocument ooDocument = new OODocument(document, new EclipseFile(
        "tmp file")); //$NON-NLS-1$

    String tag = "<aTag/>"; //$NON-NLS-1$
    ConnectorMaster.getInstance().insertTagsIntoDocument(tag, ooDocument);
View Full Code Here

    return id;
  }

  private String integrateInText(GraphicInfo graphicInfo,
      TextPosition position) {
    OODocument ooDocument = (OODocument) position.getTutorialDocument();
    ITextDocument textDocument = (ITextDocument) ooDocument.getDocument();
    ITextRange textRange = position.getTextRange();

    ITextContentService textContentService = textDocument.getTextService()
        .getTextContentService();
View Full Code Here

  public int undoIntegration(ITutorialDocument tutorialDocument,
      String integrationID, String undoString) {
    if (tutorialDocument == null)
      return 0;

    OODocument ooDocument = (OODocument) tutorialDocument;
    IDocument document = ooDocument.getDocument();

    if (document.getDocumentType().equals(IDocument.WRITER))
      return undoTextIntegration((ITextDocument) document, integrationID,
          undoString);
    if (document.getDocumentType().equals(IDocument.IMPRESS))
View Full Code Here

TOP

Related Classes of spatschorke.da.ooconnector.OODocument

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.