Package org.apache.poi.hslf.model

Examples of org.apache.poi.hslf.model.Notes


    // Finally, generate model objects for everything
    // Notes first
    _notes = new Notes[notesRecords.length];
    for (int i = 0; i < _notes.length; i++) {
      _notes[i] = new Notes(notesRecords[i]);
      _notes[i].setSlideShow(this);
    }
    // Then slides
    _slides = new Slide[slidesRecords.length];
    for (int i = 0; i < _slides.length; i++) {
      SlideAtomsSet sas = slidesSets[i];
      int slideIdentifier = sas.getSlidePersistAtom().getSlideIdentifier();

      // Do we have a notes for this?
      Notes notes = null;
      // Slide.SlideAtom.notesId references the corresponding notes slide.
      // 0 if slide has no notes.
      int noteId = slidesRecords[i].getSlideAtom().getNotesID();
      if (noteId != 0) {
        Integer notesPos = (Integer) slideIdToNotes.get(Integer.valueOf(noteId));
View Full Code Here


  // Finally, generate model objects for everything
  // Notes first
  _notes = new Notes[notesRecords.length];
  for(int i=0; i<_notes.length; i++) {
    _notes[i] = new Notes(notesRecords[i]);
    _notes[i].setSlideShow(this);
  }
  // Then slides
  _slides = new Slide[slidesRecords.length];
  for(int i=0; i<_slides.length; i++) {
    SlideAtomsSet sas = slidesSets[i];
    int slideIdentifier = sas.getSlidePersistAtom().getSlideIdentifier();

    // Do we have a notes for this?
    Notes notes = null;
        //Slide.SlideAtom.notesId references the corresponding notes slide. 0 if slide has no notes.
        int noteId = slidesRecords[i].getSlideAtom().getNotesID();
        if (noteId != 0){
            Integer notesPos = (Integer)slideIdToNotes.get(new Integer(noteId));
            if (notesPos != null) notes = _notes[notesPos.intValue()];
View Full Code Here

    //  but ensure no duplicates
    HashSet seenNotes = new HashSet();
    HeadersFooters hf = _show.getNotesHeadersFooters();

    for(int i=0; i<_slides.length; i++) {
      Notes notes = _slides[i].getNotesSheet();
      if(notes == null) { continue; }
      Integer id = new Integer(notes._getSheetNumber());
      if(seenNotes.contains(id)) { continue; }
      seenNotes.add(id);

      // Repeat the Notes header, if set
      if(hf != null && hf.isHeaderVisible() && hf.getHeaderText() != null) {
        ret.append(hf.getHeaderText() + "\n");
      }

      // Notes text
      TextRun[] runs = notes.getTextRuns();
      if(runs != null && runs.length > 0) {
        for(int j=0; j<runs.length; j++) {
          TextRun run = runs[j];
          String text = run.getText();
          ret.append(text);
View Full Code Here

    // Finally, generate model objects for everything
    // Notes first
    _notes = new Notes[notesRecords.length];
    for (int i = 0; i < _notes.length; i++) {
        if (notesRecords[i] != null) {
            _notes[i] = new Notes(notesRecords[i]);
          _notes[i].setSlideShow(this);
        }
    }
    // Then slides
    _slides = new Slide[slidesRecords.length];
    for (int i = 0; i < _slides.length; i++) {
      SlideAtomsSet sas = slidesSets[i];
      int slideIdentifier = sas.getSlidePersistAtom().getSlideIdentifier();

      // Do we have a notes for this?
      Notes notes = null;
      // Slide.SlideAtom.notesId references the corresponding notes slide.
      // 0 if slide has no notes.
      int noteId = slidesRecords[i].getSlideAtom().getNotesID();
      if (noteId != 0) {
        Integer notesPos = slideIdToNotes.get(noteId);
View Full Code Here

        SlideShow ppt = new SlideShow(hslf);
        assertTrue("No Exceptions while reading file", true);
        assertEquals(2, ppt.getSlides().length);

        TextRun txrun;
        Notes notes;

        notes = ppt.getSlides()[0].getNotesSheet();
        assertNotNull(notes);
        txrun = notes.getTextRuns()[0];
        assertEquals("Notes-1", txrun.getRawText());
        assertEquals(false, txrun.getRichTextRuns()[0].isBold());

        //notes for the second slide are in bold
        notes = ppt.getSlides()[1].getNotesSheet();
        assertNotNull(notes);
        txrun = notes.getTextRuns()[0];
        assertEquals("Notes-2", txrun.getRawText());
        assertEquals(true, txrun.getRichTextRuns()[0].isBold());

    }
View Full Code Here

        notesMap.put(Integer.valueOf(8), "The bus Z is split into Z_H and Z_L");

        Slide[] slide = ppt.getSlides();
        for (int i = 0; i < slide.length; i++) {
            Integer slideNumber = Integer.valueOf(slide[i].getSlideNumber());
            Notes notes = slide[i].getNotesSheet();
            if (notesMap.containsKey(slideNumber)){
                assertNotNull(notes);
                String text = notes.getTextRuns()[0].getRawText();
                String startingPhrase = notesMap.get(slideNumber);
                assertTrue("Notes for slide " + slideNumber + " must start with " +
                        startingPhrase , text.startsWith(startingPhrase));
            }
        }
View Full Code Here

 
  // Finally, generate model objects for everything
  // Notes first
  _notes = new Notes[notesRecords.length];
  for(int i=0; i<_notes.length; i++) {
    _notes[i] = new Notes(notesRecords[i]);
    _notes[i].setSlideShow(this);
  }
  // Then slides
  _slides = new Slide[slidesRecords.length];
  for(int i=0; i<_slides.length; i++) {
    SlideAtomsSet sas = slidesSets[i];
    int slideIdentifier = sas.getSlidePersistAtom().getSlideIdentifier();

    // Do we have a notes for this?
    Notes notes = null;
        //Slide.SlideAtom.notesId references the corresponding notes slide. 0 if slide has no notes.
        int noteId = slidesRecords[i].getSlideAtom().getNotesID();
        if (noteId != 0){
            Integer notesPos = (Integer)slideIdToNotes.get(new Integer(noteId));
            if (notesPos != null) notes = _notes[notesPos.intValue()];
View Full Code Here

        SlideShow ppt = new SlideShow(hslf);
        assertTrue("No Exceptions while reading file", true);
        assertEquals(2, ppt.getSlides().length);

        TextRun txrun;
        Notes notes;

        notes = ppt.getSlides()[0].getNotesSheet();
        assertNotNull(notes);
        txrun = notes.getTextRuns()[0];
        assertEquals("Notes-1", txrun.getRawText());
        assertEquals(false, txrun.getRichTextRuns()[0].isBold());

        //notes for the second slide are in bold
        notes = ppt.getSlides()[1].getNotesSheet();
        assertNotNull(notes);
        txrun = notes.getTextRuns()[0];
        assertEquals("Notes-2", txrun.getRawText());
        assertEquals(true, txrun.getRichTextRuns()[0].isBold());

    }
View Full Code Here

        notesMap.put(Integer.valueOf(8), "The bus Z is split into Z_H and Z_L");

        Slide[] slide = ppt.getSlides();
        for (int i = 0; i < slide.length; i++) {
            Integer slideNumber = Integer.valueOf(slide[i].getSlideNumber());
            Notes notes = slide[i].getNotesSheet();
            if (notesMap.containsKey(slideNumber)){
                assertNotNull(notes);
                String text = notes.getTextRuns()[0].getRawText();
                String startingPhrase = notesMap.get(slideNumber);
                assertTrue("Notes for slide " + slideNumber + " must start with " +
                        startingPhrase , text.startsWith(startingPhrase));
            }
        }
View Full Code Here

 
  // Finally, generate model objects for everything
  // Notes first
  _notes = new Notes[notesRecords.length];
  for(int i=0; i<_notes.length; i++) {
    _notes[i] = new Notes(notesRecords[i]);
    _notes[i].setSlideShow(this);
  }
  // Then slides
  _slides = new Slide[slidesRecords.length];
  for(int i=0; i<_slides.length; i++) {
    SlideAtomsSet sas = slidesSets[i];
    int slideIdentifier = sas.getSlidePersistAtom().getSlideIdentifier();

    // Do we have a notes for this?
    Notes notes = null;
        //Slide.SlideAtom.notesId references the corresponding notes slide. 0 if slide has no notes.
        int noteId = slidesRecords[i].getSlideAtom().getNotesID();
        if (noteId != 0){
            Integer notesPos = (Integer)slideIdToNotes.get(new Integer(noteId));
            if (notesPos != null) notes = _notes[notesPos.intValue()];
View Full Code Here

TOP

Related Classes of org.apache.poi.hslf.model.Notes

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.