Example usage for org.apache.poi.hwpf.sprm SprmOperation getOperation

List of usage examples for org.apache.poi.hwpf.sprm SprmOperation getOperation

Introduction

In this page you can find the example usage for org.apache.poi.hwpf.sprm SprmOperation getOperation.

Prototype

public int getOperation() 

Source Link

Usage

From source file:com.krawler.esp.fileparser.word.ExtractWordFile.java

License:Open Source License

private boolean isDeleted(byte[] grpprl) {
    SprmIterator iterator = new SprmIterator(grpprl, 0);
    while (iterator.hasNext()) {
        SprmOperation op = iterator.next();
        // 0 is the operation that signals a FDelRMark operation
        if (op.getOperation() == 0 && op.getOperand() != 0) {
            return true;
        }//from  ww  w.j  a  va  2  s  . c  om
    }
    return false;
}

From source file:org.apache.nutch.parse.msword.WordExtractor.java

License:Apache License

/**
 * Used to determine if a run of text has been deleted.
 *
 * @param grpprl The list of sprms for a particular run of text.
 * @return true if this run of text has been deleted.
 *//*from  w ww . ja  va 2s.  c  o  m*/
private boolean isDeleted(byte[] grpprl) {
    SprmIterator iterator = new SprmIterator(grpprl, 0);
    while (iterator.hasNext()) {
        SprmOperation op = iterator.next();
        // 0 is the operation that signals a FDelRMark operation
        if (op.getOperation() == 0 && op.getOperand() != 0) {
            return true;
        }
    }
    return false;
}