Examples of HyperlinkRecord


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

                addCell(record, new NumberCell(rk.getRKNumber(), format));
                break;

            case HyperlinkRecord.sid: // holds a URL associated with a cell
                if (currentSheet != null) {
                    HyperlinkRecord link = (HyperlinkRecord) record;
                    Point point =
                        new Point(link.getFirstColumn(), link.getFirstRow());
                    Cell cell = currentSheet.get(point);
                    if (cell != null) {
                        String address = link.getAddress();
                        if (address != null) {
                            addCell(record, new LinkedCell(cell, address));
                        } else {
                            addCell(record, cell);
                        }
View Full Code Here

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

     */
    public HSSFHyperlink getHyperlink(){
        for (Iterator it = sheet.getSheet().getRecords().iterator(); it.hasNext(); ) {
            RecordBase rec = (RecordBase) it.next();
            if (rec instanceof HyperlinkRecord){
                HyperlinkRecord link = (HyperlinkRecord)rec;
                if(link.getFirstColumn() == record.getColumn() && link.getFirstRow() == record.getRow()){
                    return new HSSFHyperlink(link);
                }
            }
        }
        return null;
View Full Code Here

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

                addCell(record, new NumberCell(rk.getRKNumber(), format));
                break;

            case HyperlinkRecord.sid: // holds a URL associated with a cell
                if (currentSheet != null) {
                    HyperlinkRecord link = (HyperlinkRecord) record;
                    Point point =
                        new Point(link.getFirstColumn(), link.getFirstRow());
                    Cell cell = currentSheet.get(point);
                    if (cell != null) {
                        String address = link.getAddress();
                        if (address != null) {
                            addCell(record, new LinkedCell(cell, address));
                        } else {
                            addCell(record, cell);
                        }
View Full Code Here

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

     */
    public HSSFHyperlink getHyperlink(){
        for (Iterator<RecordBase> it = _sheet.getSheet().getRecords().iterator(); it.hasNext(); ) {
            RecordBase rec = it.next();
            if (rec instanceof HyperlinkRecord){
                HyperlinkRecord link = (HyperlinkRecord)rec;
                if(link.getFirstColumn() == _record.getColumn() && link.getFirstRow() == _record.getRow()){
                    return new HSSFHyperlink(link);
                }
            }
        }
        return null;
View Full Code Here

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

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

   
    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
Copyright © 2018 www.massapi.com. 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.