Package org.zkoss.poi.hssf.record

Examples of org.zkoss.poi.hssf.record.HyperlinkRecord


      final int maxcol = SpreadsheetVersion.EXCEL97.getLastColumnIndex();
      final int maxrow = SpreadsheetVersion.EXCEL97.getLastRowIndex();
        for (Iterator<RecordBase> it = _helper.getInternalSheet().getRecords().iterator(); it.hasNext(); ) {
            RecordBase rec = it.next();
            if (rec instanceof HyperlinkRecord){
                final HyperlinkRecord link = (HyperlinkRecord)rec;
                final int col = link.getFirstColumn();
                final int row = link.getFirstRow();
                if (inRange(row, tRow, bRow) && inRange(col, lCol, rCol)) {
                  final int dstrow = row + nRow;
                  final int dstcol = col + nCol;
                  if (inRange(dstrow, 0, maxrow) && inRange(dstcol, 0, maxcol)) {
                    link.setFirstColumn(dstcol);
                    link.setFirstRow(dstrow);
                    link.setLastColumn(dstcol);
                    link.setLastRow(dstrow);
                  } else {
                    it.remove();
                  }
                }
            }
View Full Code Here


   
    private void removeHyperlinks(int tRow, int bRow, int lCol, int rCol) {
        for (Iterator<RecordBase> it = _helper.getInternalSheet().getRecords().iterator(); it.hasNext(); ) {
            RecordBase rec = it.next();
            if (rec instanceof HyperlinkRecord){
                final HyperlinkRecord link = (HyperlinkRecord)rec;
                final int col = link.getFirstColumn();
                final int row = link.getFirstRow();
                if (inRange(row, tRow, bRow) && inRange(col, lCol, rCol)) {
                   it.remove();
                }
            }
        }
View Full Code Here

TOP

Related Classes of org.zkoss.poi.hssf.record.HyperlinkRecord

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.