com.aspose.words

Class StoryType

  • java.lang.Object
    • com.aspose.words.StoryType
public class StoryType 
extends java.lang.Object

Utility class containing constants. Text of a Word document is stored in stories. StoryType identifies a story.

Example:

Shows how to clear a body of inline shapes.
Document doc = new Document();
DocumentBuilder builder = new DocumentBuilder(doc);

// Use a DocumentBuilder to insert a shape
// This is an inline shape, which has a parent Paragraph, which is in turn a child of the Body
builder.insertShape(ShapeType.CUBE, 100.0, 100.0);

Assert.assertEquals(doc.getChildNodes(NodeType.SHAPE, true).getCount(), 1);

// We can delete all such shapes from the Body, affecting all child Paragraphs
Assert.assertEquals(doc.getFirstSection().getBody().getStoryType(), StoryType.MAIN_TEXT);
doc.getFirstSection().getBody().deleteShapes();

Assert.assertEquals(doc.getChildNodes(NodeType.SHAPE, true).getCount(), 0);

Field Summary
static final intNONE = 0
Default value. There is no such story in the document.
static final intMAIN_TEXT = 1
Contains the main text of the document, represented by Body.
static final intFOOTNOTES = 2
Contains footnote text, represented by Footnote.
static final intENDNOTES = 3
Contains endnotes text, represented by Footnote.
static final intCOMMENTS = 4
Contains document comments (annotations), represented by Comment.
static final intTEXTBOX = 5
Contains shape or textbox text, represented by Shape.
static final intEVEN_PAGES_HEADER = 6
Contains text of the even pages header, represented by HeaderFooter.
static final intPRIMARY_HEADER = 7
Contains text of the primary header. When header is different for odd and even pages, contains text of the odd pages header. Represented by HeaderFooter.
static final intEVEN_PAGES_FOOTER = 8
Contains text of the even pages footer, represented by HeaderFooter.
static final intPRIMARY_FOOTER = 9
Contains text of the primary footer. When footer is different for odd and even pages, contains text of the odd pages footer. Represented by HeaderFooter.
static final intFIRST_PAGE_HEADER = 10
Contains text of the first page header, represented by HeaderFooter.
static final intFIRST_PAGE_FOOTER = 11
Contains text of the first page footer, represented by HeaderFooter.
static final intFOOTNOTE_SEPARATOR = 12
Contains the text of the footnote separator, represented by Aspose.Words.FootnoteSeparator.
static final intFOOTNOTE_CONTINUATION_SEPARATOR = 13
Contains the text of the footnote continuation separator, represented by Aspose.Words.FootnoteSeparator.
static final intFOOTNOTE_CONTINUATION_NOTICE = 14
Contains the text of the footnote continuation notice separator, represented by Aspose.Words.FootnoteSeparator.
static final intENDNOTE_SEPARATOR = 15
Contains the text of the endnote separator, represented by Aspose.Words.FootnoteSeparator.
static final intENDNOTE_CONTINUATION_SEPARATOR = 16
Contains the text of the endnote continuation separator, represented by Aspose.Words.FootnoteSeparator.
static final intENDNOTE_CONTINUATION_NOTICE = 17
Contains the text of the endnote continuation notice separator, represented by Aspose.Words.FootnoteSeparator.
 

    • Field Detail

      • NONE = 0

        public static final int NONE
        Default value. There is no such story in the document.
      • MAIN_TEXT = 1

        public static final int MAIN_TEXT
        Contains the main text of the document, represented by Body.
      • FOOTNOTES = 2

        public static final int FOOTNOTES
        Contains footnote text, represented by Footnote.
      • ENDNOTES = 3

        public static final int ENDNOTES
        Contains endnotes text, represented by Footnote.
      • COMMENTS = 4

        public static final int COMMENTS
        Contains document comments (annotations), represented by Comment.
      • TEXTBOX = 5

        public static final int TEXTBOX
        Contains shape or textbox text, represented by Shape.
      • EVEN_PAGES_HEADER = 6

        public static final int EVEN_PAGES_HEADER
        Contains text of the even pages header, represented by HeaderFooter.
      • PRIMARY_HEADER = 7

        public static final int PRIMARY_HEADER
        Contains text of the primary header. When header is different for odd and even pages, contains text of the odd pages header. Represented by HeaderFooter.
      • EVEN_PAGES_FOOTER = 8

        public static final int EVEN_PAGES_FOOTER
        Contains text of the even pages footer, represented by HeaderFooter.
      • PRIMARY_FOOTER = 9

        public static final int PRIMARY_FOOTER
        Contains text of the primary footer. When footer is different for odd and even pages, contains text of the odd pages footer. Represented by HeaderFooter.
      • FIRST_PAGE_HEADER = 10

        public static final int FIRST_PAGE_HEADER
        Contains text of the first page header, represented by HeaderFooter.
      • FIRST_PAGE_FOOTER = 11

        public static final int FIRST_PAGE_FOOTER
        Contains text of the first page footer, represented by HeaderFooter.
      • FOOTNOTE_SEPARATOR = 12

        public static final int FOOTNOTE_SEPARATOR
        Contains the text of the footnote separator, represented by Aspose.Words.FootnoteSeparator.
      • FOOTNOTE_CONTINUATION_SEPARATOR = 13

        public static final int FOOTNOTE_CONTINUATION_SEPARATOR
        Contains the text of the footnote continuation separator, represented by Aspose.Words.FootnoteSeparator.
      • FOOTNOTE_CONTINUATION_NOTICE = 14

        public static final int FOOTNOTE_CONTINUATION_NOTICE
        Contains the text of the footnote continuation notice separator, represented by Aspose.Words.FootnoteSeparator.
      • ENDNOTE_SEPARATOR = 15

        public static final int ENDNOTE_SEPARATOR
        Contains the text of the endnote separator, represented by Aspose.Words.FootnoteSeparator.
      • ENDNOTE_CONTINUATION_SEPARATOR = 16

        public static final int ENDNOTE_CONTINUATION_SEPARATOR
        Contains the text of the endnote continuation separator, represented by Aspose.Words.FootnoteSeparator.
      • ENDNOTE_CONTINUATION_NOTICE = 17

        public static final int ENDNOTE_CONTINUATION_NOTICE
        Contains the text of the endnote continuation notice separator, represented by Aspose.Words.FootnoteSeparator.