Package org.apache.poi.hwpf.model

Examples of org.apache.poi.hwpf.model.GenericPropertyNode


    }
   
    PlexOfCps plc = new PlexOfCps(_tableStream, _fib.getFcPlcffldMom(), _fib.getLcbPlcffldMom(), 2);
    for (int x = 0; x < plc.length(); x++)
    {
      GenericPropertyNode node = plc.getProperty(x);
      byte[] fld = node.getBytes();
      int breakpoint = 0;
    }
  }
View Full Code Here


            List<PAPX> papxs = new ArrayList<PAPX>();

            int length = binTable.length();
            for ( int x = 0; x < length; x++ )
            {
                GenericPropertyNode node = binTable.getProperty( x );

                int pageNum = LittleEndian.getInt( node.getBytes() );
                int pageOffset = POIFSConstants.SMALLER_BIG_BLOCK_SIZE
                        * pageNum;

                PAPFormattedDiskPage pfkp = new PAPFormattedDiskPage(
                        mainStream, doc.getDataStream(), pageOffset,
View Full Code Here

            List<PAPX> papxs = new ArrayList<PAPX>();

            int length = binTable.length();
            for ( int x = 0; x < length; x++ )
            {
                GenericPropertyNode node = binTable.getProperty( x );

                int pageNum = LittleEndian.getInt( node.getBytes() );
                int pageOffset = POIFSConstants.SMALLER_BIG_BLOCK_SIZE
                        * pageNum;

                PAPFormattedDiskPage pfkp = new PAPFormattedDiskPage(
                        mainStream, doc.getDataStream(), pageOffset,
View Full Code Here

   *  given plcfHdd index
   */
  private String getAt(int plcfHddIndex) {
    if(plcfHdd == null) return null;
   
    GenericPropertyNode prop = plcfHdd.getProperty(plcfHddIndex);
    if(prop.getStart() == prop.getEnd()) {
      // Empty story
      return "";
    }
   
    // Grab the contents
    String text =
      headerStories.text().substring(prop.getStart(), prop.getEnd());
   
    // Strip off fields and macros if requested
    if(stripFields) {
      return Range.stripFields(text);
    }
View Full Code Here

   *  given plcfHdd index
   */
  private String getAt(int plcfHddIndex) {
    if(plcfHdd == null) return null;

    GenericPropertyNode prop = plcfHdd.getProperty(plcfHddIndex);
    if(prop.getStart() == prop.getEnd()) {
      // Empty story
      return "";
    }

    // Grab the contents
    String text =
      headerStories.text().substring(prop.getStart(), prop.getEnd());

    // Strip off fields and macros if requested
    if(stripFields) {
      return Range.stripFields(text);
    }
View Full Code Here

   *  given plcfHdd index
   */
  private String getAt(int plcfHddIndex) {
    if(plcfHdd == null) return null;

    GenericPropertyNode prop = plcfHdd.getProperty(plcfHddIndex);
    if(prop.getStart() == prop.getEnd()) {
      // Empty story
      return "";
    }
    if(prop.getEnd() < prop.getStart()) {
       // Broken properties?
       return "";
    }

    // Ensure we're getting a sensible length
    String rawText = headerStories.text();
    int start = Math.min(prop.getStart(), rawText.length());
    int end = Math.min(prop.getEnd(), rawText.length());

    // Grab the contents
    String text = rawText.substring(start, end);

    // Strip off fields and macros if requested
View Full Code Here

        public int getEnd()
        {
            int currentIndex = bookmarksTables.getDescriptorFirstIndex( first );
            try
            {
                GenericPropertyNode descriptorLim = bookmarksTables
                        .getDescriptorLim( currentIndex );
                return descriptorLim.getStart();
            }
            catch ( IndexOutOfBoundsException exc )
            {
                return first.getEnd();
            }
View Full Code Here

   */
    @Deprecated
  private String getAt(int plcfHddIndex) {
    if(plcfHdd == null) return null;

    GenericPropertyNode prop = plcfHdd.getProperty(plcfHddIndex);
    if(prop.getStart() == prop.getEnd()) {
      // Empty story
      return "";
    }
    if(prop.getEnd() < prop.getStart()) {
       // Broken properties?
       return "";
    }

    // Ensure we're getting a sensible length
    String rawText = headerStories.text();
    int start = Math.min(prop.getStart(), rawText.length());
    int end = Math.min(prop.getEnd(), rawText.length());

    // Grab the contents
    String text = rawText.substring(start, end);

    // Strip off fields and macros if requested
View Full Code Here

    private Range getSubrangeAt( int plcfHddIndex )
    {
        if ( plcfHdd == null )
            return null;

        GenericPropertyNode prop = plcfHdd.getProperty( plcfHddIndex );
        if ( prop.getStart() == prop.getEnd() )
        {
            // Empty story
            return null;
        }
        if ( prop.getEnd() < prop.getStart() )
        {
            // Broken properties?
            return null;
        }

        final int headersLength = headerStories.getEndOffset()
                - headerStories.getStartOffset();
        int start = Math.min( prop.getStart(), headersLength );
        int end = Math.min( prop.getEnd(), headersLength );

        return new Range( headerStories.getStartOffset() + start,
                headerStories.getStartOffset() + end, headerStories );
    }
View Full Code Here

        return new BookmarkImpl( first );
    }

    public Bookmark getBookmark( int index )
    {
        final GenericPropertyNode first = bookmarksTables
                .getDescriptorFirst( index );
        return getBookmark( first );
    }
View Full Code Here

TOP

Related Classes of org.apache.poi.hwpf.model.GenericPropertyNode

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.